Countdown

Discussion around the SwissMicros DM42 calculator
MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 3:47 pm

Countdown

Post by MikeOR »

I'm writing a routine for playing the popular game "Countdown". So far I have done the following:
1. Increased SIZE
2. Wrote routine to ASTO the alphabet in the first 26 memories
3. Wrote 2 routines for randomly selecting Vowels and Consonants
4. Assigned these to Keys
5. Installed a counter, up to 9 letters.
What I would like to include is a device for displaying a row of the letters selected, but how?
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

Re: Countdown

Post by ijabbott »

Is that normal Countdown or "Street Countdown"?

https://youtu.be/0-GRjNocLs8
MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 3:47 pm

Re: Countdown

Post by MikeOR »

Countdown is a TV game, where two competitors choose random Vowels or Consonants to a total of nine letters. The competitors then try to make the longest word from the drawn letters. I am only trying to simulate the drawing of the letters, but not the rest of the game.
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

Re: Countdown

Post by ijabbott »

I'm familiar with Countdown. I even watched the first show when Channel 4 started. (It was such a novelty at that time in the UK to have a choice of four TV stations!)

Anyway, I'm wondering why you need to store the alphabet.
MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 3:47 pm

Re: Countdown

Post by MikeOR »

Do you know of another way to choose letters?
User avatar
ijabbott
Posts: 253
Joined: Fri Dec 15, 2017 2:34 pm
Location: GB-MAN

Re: Countdown

Post by ijabbott »

Well, if you want to pick any letter from A to Z, you just need to pick a number from 65 to 90 and do XTOA.

But I suspect you want to pick either a vowel or a consonant, so that doesn't work without a bit of manipulation. So in that case, using registers is probably easiest. You'd only need 5 registers though. One for the vowels and four for the consonants as you can store 6 letters per register.
MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 3:47 pm

Re: Countdown

Post by MikeOR »

How would you arcl just a single letter from a store of 6? Here is my routine for choosing a vowel:
1. LOL "VOWEL"
2. RAN
3. 5
4. *
5. IT
6. 1
7. +
8. RCL IND ST X
9. AVIEW
10. END

Apologies if it's a bit crude. It's a long time since I did any programming 😎
It is a trivial error, but substituting ARCL for RCL on Line 8 gives me the desired row of selected letters. Now I will tackle the letter frequency problem
Last edited by MikeOR on Mon Jul 02, 2018 11:56 pm, edited 1 time in total.
Bill (Smithville NJ)
Posts: 34
Joined: Sat Jul 22, 2017 9:14 pm

Re: Countdown

Post by Bill (Smithville NJ) »

I would probably use two matrix variables - vowel and consonant.
Each matrix element could contain the numeric representation of the character.

Then just randomly choose an element from the particular matrix, and XTOA it to the alpha register.

Bill
Smithville, NJ
MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 3:47 pm

Re: Countdown

Post by MikeOR »

You lost me, Bill. I'm not yet conversant with matrices, but I'm willing to learn
keithdalby
Posts: 564
Joined: Mon Apr 24, 2017 8:38 pm

Re: Countdown

Post by keithdalby »

Using a matrix as a lookup table for the value for XTOA? Good idea.
Post Reply