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?
Countdown
Re: Countdown
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.
Re: Countdown
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.
Anyway, I'm wondering why you need to store the alphabet.
Re: Countdown
Do you know of another way to choose letters?
Re: Countdown
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.
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.
Re: Countdown
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
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.
-
- Posts: 34
- Joined: Sat Jul 22, 2017 9:14 pm
Re: Countdown
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
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
Re: Countdown
You lost me, Bill. I'm not yet conversant with matrices, but I'm willing to learn
-
- Posts: 564
- Joined: Mon Apr 24, 2017 8:38 pm
Re: Countdown
Using a matrix as a lookup table for the value for XTOA? Good idea.