Hangman for Casio CFX-9850G

Home
Bolo
Programming
Chemistry
More about me
Linx
Legal stuff
History of this page
Sign my guestbook
View my guestbook
Mail me
Hangman 1.1

Description: Play Hangman against the computer with 9 levels of difficulty. Input your own words!
Size: Hangman: around 1210 bytes  Char: 472 bytes  Matrix B (with 26 words): 2430 bytes

SYMBOL EXPLANATION:

@    means     theta
/    means     division
_    means     display
<=   means     less than or equal
>=   means     greater than or equal
<>   means     not equal
=>   means     then
->   means     assign
*    means     multiply
%    means     exponent [EXP]
Only used in title screen:
a              Lowercase a (press: [vars] [f3] [f3] [f1])
c              Lowercase c (press: [vars] [f3] [f3] [f3])
d              Lowercase d (press: [vars] [f3] [f3] [f4])
e              Lowercase e (press: [vars] [f3] [f3] [f5])
i              Lowercase i (press: [optn] [f3] [f1])
m              Lowercase m (press: [optn] [f6] [f6] [f1] [f1])
n              Lowercase n (press: [vars] [f3] [f1] [f1])
o              Lowercase o (press: [vars] [f3] [f3] [f1])
r              Lowercase r (press: [vars] [f3] [f5] [f1])
s              Lowercase s (press: [vars] [f5] [f6] [f2]) (plus models only)
t              Lowercase t (press: [vars] [f5] [f6] [f3]) (plus models only)
y              Lowercase y (press: [vars] [f3] [f2] [f1])
Create a new file named: HANGMAN
ViewWindow 1,127,0,1,63,0
LabelOff
ClrText
Orange "       HanGman"        // (7 spaces)
Green " by JameS AndreWarTHa"  // (1 space)
"     VerSion 1.1"             // (5 spaces)
" (c) 1998 ALL RIGHTS"         // (1 space)
"      RESERVED"_              // (6 spaces)
ClrText
" "
Locate 1,1,"DIFFICULTY LEVEL 1-9"
"1:HARD 9:EASY"?->Z
Z<1=>1->Z
Z>9=>9->Z
Lbl S
Int (Ran#*Mat B[1,1])+2->W
Mat B[W,1]->L
0->T
9->V
55->U
For 2->A To 9
0->Mat B[1,A]
Next
For 64->A To (L+7)*8 Step 8
Green F-Line A,10,A+6,10
Next
Text 1,50,"HANGMAN"
Text 15,57,"LIVES:"
Text 15,82,V
Text 21,57,"GUESS:"
Orange F-Line 48,8,48,50
Lbl G
Text 15,82,V
If V=8
Then Green F-Line 5,5,38,5
Green F-Line 10,6,10,55
Green F-Line 11,55,25,55
Green F-Line 25,54,25,52
IfEnd
V=7=>Circle 25,42,9
If V=6
Then For 20->A To 26 Step 6
F-Line A,44,A,46
F-Line A+1,47,A+3,47
F-Line A+4,46,A+4,44
F-Line A+3,43,A+1,43
Next
IfEnd
If V=5
Then Orange F-Line 22,36,25,39
Orange F-Line 25,39,28,36
IfEnd
V=4=>F-Line 25,32,25,20
V=3=>F-Line 25,20,20,10
V=2=>F-Line 25,20,30,10
V=1=>F-Line 18,27,32,27
V=0=>Goto D
If Z<V
Then V-1->V
Goto G
IfEnd
Lbl A
Getkey->A
Frac (A/10)>.6 Or A=31 Or A=41 Or A=51 Or A=61 Or A=0 Or A=44=>Goto A
21->Y
82->X
Prog "CHAR"
1->C
Do
1+C->C
LpWhile Mat B[W,C]<>A And C<L+1
For 1->B To 250
Next
Orange Text 21,82," "
If Mat B[W,C]<>A
Then U->X
30->Y
Green F-Line X-1,Y-1,X+3,Y+5
Prog "CHAR"
V-1->V
U+6->U
Goto G
IfEnd
C*8+50->X
48->Y
Prog "CHAR"
If Mat B[1,C]<>1
Then 1->Mat B[1,C]
1+T->T
IfEnd
T=L=>Goto W
Goto A
Lbl D
Green F-Line 20,43,24,47
Green F-Line 20,47,24,43
Green F-Line 26,43,40,47
Green F-Line 26,47,30,43
Goto P
Lbl W
Green Text 40,57,"YOU WIN!"
Lbl P
Green Text 15,90,"PLAY"
Green Text 21,90,"AGAIN Y/N"
Lbl Q
Getkey->A
A<>32 And A<>64=>Goto Q
If A=32
Then ViewWindow 1,127,0,1,63,0
Goto S
Create a new file named: CHAR
A=76=>Orange Text Y,X,"A"
A=66=>Orange Text Y,X,"B"
A=56=>Orange Text Y,X,"C"
A=46=>Orange Text Y,X,"D"
A=36=>Orange Text Y,X,"E"
A=26=>Orange Text Y,X,"F"
A=75=>Orange Text Y,X,"G"
A=65=>Orange Text Y,X,"H"
A=55=>Orange Text Y,X,"I"
A=45=>Orange Text Y,X,"J"
A=35=>Orange Text Y,X,"K"
A=25=>Orange Text Y,X,"L"
A=74=>Orange Text Y,X,"M"
A=64=>Orange Text Y,X,"N"
A=54=>Orange Text Y,X,"O"
A=73=>Orange Text Y,X,"P"
A=63=>Orange Text Y,X,"Q"
A=53=>Orange Text Y,X,"R"
A=43=>Orange Text Y,X,"S"
A=33=>Orange Text Y,X,"T"
A=72=>Orange Text Y,X,"U"
A=62=>Orange Text Y,X,"V"
A=52=>Orange Text Y,X,"W"
A=42=>Orange Text Y,X,"X"
A=32=>Orange Text Y,X,"Y"
A=71=>Orange Text Y,X,"Z"
Text 1,1," "
Return
Matrix coding:

In [1,1] you enter the total number of words. In the example below, 26 is inserted.
The rest of row 1 is filled with zeros.
Each row (horizontal line) is a word. The first number is the length of the word; the number of letters in it (no more than 8)
The next entries are keycodes for letters. Note that the keycodes are *not* the alphabetical value (i.e. A is not 1, B is not 2...).
The letter are to be entered as the number the key on the Casio returns when you push it. Here are some examples:

 A = 76

 B = 66

To find the keycode for any letter, please check the CHAR program above.
Each word can have a maximum of 8 letters, and only *one* of each letter, the program will not work properly with duplicate letters.
There can be as many words as you like, within the constraints of memory.
For more information, view the info file.

First, set the dimensions of Matrix B to [27x9]:
Enter MAT mode, and hit [arrow down] [2] [7] [EXE] [9] [EXE]
Now you can begin to enter words. Below is an example of a word-list

123456789
12600000000
2336546400000
37567253337655640
4665766446253600
54253676260000
64436554360000
757553763336000
8674546435363200
9643525533566500
10343353200000
117364276563325320
1284372553376662536
1355665765564000
147545375766455560
1556555647536000
16671367365325300
17643657646545200
18366544200000
194625556360000
20645765635363300
2155653557436000
2254654757476000
23656766236536400
2453663725573000
2587553764655366433
2687336534354647625
2787365324355567625



This page is constantly under construction, so don't worry if some of the linx don't work. If you've been here before, you could also reload this page to get the latest version. This page was last modified 19th June 1999. Best viewed with Netscape Navigator at 800x600 or above. Oh yeah, and don't forget to look at the legal stuff before you copy anything.


Data Analysis AustraliaThis space has been provided by
Data Analysis Australia
Since 26/2/99, you are visitor number
Served by WebCounter