## Countdown

Discussion around the Swiss Micros DM42 calculator.
MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 1:47 pm

### Countdown

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?

ijabbott
Posts: 128
Joined: Fri Dec 15, 2017 1:34 pm
Location: Manchester, UK

### Re: Countdown

Is that normal Countdown or "Street Countdown"?

https://youtu.be/0-GRjNocLs8

MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 1:47 pm

### 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.

ijabbott
Posts: 128
Joined: Fri Dec 15, 2017 1:34 pm
Location: Manchester, UK

### 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.

MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 1:47 pm

### Re: Countdown

Do you know of another way to choose letters?

ijabbott
Posts: 128
Joined: Fri Dec 15, 2017 1:34 pm
Location: Manchester, UK

### 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.

MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 1:47 pm

### 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
Last edited by MikeOR on Mon Jul 02, 2018 9:56 pm, edited 1 time in total.

Bill (Smithville NJ)
Posts: 26
Joined: Sat Jul 22, 2017 7: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

MikeOR
Posts: 16
Joined: Thu Jun 21, 2018 1:47 pm

### Re: Countdown

You lost me, Bill. I'm not yet conversant with matrices, but I'm willing to learn

keithdalby
Posts: 521
Joined: Mon Apr 24, 2017 6:38 pm

### Re: Countdown

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