#### Mastermind

*This is a twist on the classic board game. You try and figure out the code before the wall kills you.*

This game comes in two parts, the game program, and the help files. The help files were written before the wall was added in - I think - and need to be updated. Also, users get confused about some of the data returned on their guess, so that also needs to be updated.

Once the site approves it, you can download it here.

```
:
1→L
1→dim(∟MST
0→S
getKey→K
While K≠0
getKey→K
End
FnOff
AxesOff
Lbl MS
ClrDraw
Text(0,0,"-------------------------"
Text(48,0,"-------------------------"
Text(55,1,"PRESS ANY KEY or F5 FOR HELP"
Text(5,5,"OSDOT ORIGINAL"
Text(25,15,"MASTERMIND"
Text(37,20,"V: 4.0"
90→O
Lbl SS
O+1→O
If O>55:13→O
Pxl-Change(24,O)
Pxl-Change(25,O)
Pxl-Change(26,O)
Pxl-Change(27,O)
Pxl-Change(28,O)
Pxl-Change(29,O)
Pxl-Change(30,O)
Pxl-Change(31,O)
Pxl-Change(32,O)
0→K
getKey→K
If K≠0 and K≠15:Goto BG
If K=15:Goto HP
Goto SS
Lbl HP
prgmMASTRHLP
Goto MS
Lbl BG
100→Q
17→R
FnOn
AxesOn
ClrHome
4→dim(L1)
4→dim(L2)
7→dim(L3)
1→L3(7)
0→L3(6)
0→L3(5)
For(X,1,4
0→L2(X)
0→L1(X)
0→L3(X)
End
ClrHome
0→C
0→A
1→B
For(X,1,16)
Output(1,X,"-"
Output(6,X,"-"
End
Output(1,4,"MASTERMIND"
Output(6,4,"LEVEL: "
Output(6,11,L
Output(7,16,"P")
Output(8,16,"S")
Lbl TP
For(X,1,4)
Output(X+1,1,"Ð"
7→W
While L3(W)≠0
randInt(0,5)→W
W+1→W
End
W-1→L2(X)
1→L3(W)
End
Lbl TN
0→L1(1)
0→L1(2)
0→L1(3)
0→L1(4)
1→B
A+1→A
Output(B+1,A+1,"<")
Lbl DO
Q-1→Q
If Q<0:Then
200-(L*2)→Q
If Q/40:40→Q
R-1→R
Output(2,R,"X"
Output(3,R,"X"
Output(4,R,"X"
Output(5,R,"X"
If AùR:Goto ZZ
End
If C=0:getKey→C
If C=25:Then
If A≠R-1:Output(B+1,A+1," "
If A=R-1:Output(B+1,A+1,"X"
B-1→B
If B<1:1→B
Output(B+1,A+1,"<"
End
If C=34:Then
If A≠R-1:Output(B+1,A+1," "
If A=R-1:Output(B+1,A+1,"X"
B+1→B
If B>4:4→B
Output(B+1,A+1,"<"
End
If C=24:Then
L1(B)-1→L1(B)
If L1(B)<0:5→L1(B)
End
If C=26:Then
L1(B)+1→L1(B)
If L1(B)>5:0→L1(B)
End
If C=21 or C=105:Then
0→Z
0→W
For(X,1,4
If L2(X)=L1(X):Z+1→Z
If L1(X)=L2(1) or L1(X)=L2(2) or L1(X)=L2(3) or L1(X)=L2(4):W+1→W
End
Output(8,A,W)
Output(7,A,Z)
If Z=4:Goto WN
If A=15 or AùR-1:Goto ZZ
A+1→A
For(X,1,4
0→L1(X)
End
Output(B+1,A+1,"<"
End
If C=45:Goto ZZ
If C≠0
Then
For(X,1,4)
L1(X)→Y
If Y=0:Output(X+1,A,"Ð"
If Y=1:Output(X+1,A,"*"
If Y=2:Output(X+1,A,"Ñ"
If Y=3:Output(X+1,A,"Ä"
If Y=4:Output(X+1,A,"?"
If Y=5:Output(X+1,A,","
End
End
getKey→C
Goto DO
Lbl WN
ClrHome
ClrDraw
10*(R-A)+S→S
int(S)→S
Output(4,4,"SCORE:"
Output(5,5,S
Output(2,1,"LEVEL COMPLETE!"
L+1→L
Pause
Goto BG
Lbl ZZ
ClrHome
If L=9:Output(2,1,"GOOD GAME, TOO BAD YOU LOST."
If L=3:Output(2,1,"LOOSER."
If L=4:Output(2,1,"YOU FAIL AT LIFE."
If L=5:Output(2,1,"YOU PLAY LIKE A FRESHMEN!"
If L=6:Output(2,1,"LEVEL 6 WINS AGAIN."
If L=2:Output(2,1,"N00B."
If L=7:Output(2,1,"YOU SMELL LIKE STALE MARSHMALLOWS."
If L=8:Output(2,1,"YOU FAIL AT FAILING."
If L=10:Output(2,1,"MY PET ROCK IS SMARTER THAN YOU!
If L=11:Output(2,1,"HAVING FUN YET?"
If L=12:Output(2,1,"YOU NEED A PERMIT TO BE THAT STUPID!"
If L=13:Output(2,1,"GAME OVER."
If L=1:Output(2,1,"YOU KNOW HOW TO READ THE HELP FILES, RIGHT?"
If L=14:Output(2,1," THE FLYING MONKEYS MUST HAVE STOLEN YOUR BRAIN!"
If Lù15:Output(2,1,"YOU MUST HAVE NO LIFE TO GET THIS FAR."
End
Output(6,4,"SCORE:"
Output(7,5,S
If T=Ä and U=ln(Ä):Output(7,5,"-1,000,000"
If S>∟MST(1):Then
S→∟MST(1)
ClrHome
Output(2,1,"HIGH SCORE! ...YOU'RE OK."
Output(6,4,"HIGH SCORE:"
Output(7,5,S
Pause
ClrHome
```

old question:

Ok, I thought it would be easy to get it off my calc, but I can't figure it out. The Ti DataEditor only lets me edit list and stuff, not programs. How do I read the program as text to post up here? - btw, I'm going out of town for a while, so I may not post soon…