` ``:16.8 -> X :1.1->Z :Z->H :1.6->A :0->Theta :Repeat Theta :Lbl Theta :ClrHome :Output(10fPart(Z),int(Z),"* :Output(10fPart(H),int(H),"* :Output(10fPart(X),int(X),"i :Output(10fPart(A),int(A),"pi :getKey->K :X+(K=43)-(K=41)+.1((K=42)-(K=32->X :A+(K=26)-(K=24)+.1((K=34)-(K=25->A :fPart(A :A+16((A<1)-(A>17))-.8((Ans>.8)-(not(Ans->A :fPart(X :X+16((X<1)-(X>17))-.8((Ans>.8)-(not(Ans->X :max(A={H,Z})+2max(X={H,Z})->Theta :If K=15 :randInt(1,16)+.1randInt(1,8)->Z :If K=31 :randInt(1,16)+.1randInt(1,8)->H :End :ClrHome :If Theta=1 :Output(4,5,"i Wins! :If Theta=2 :Output(4,5,"pi Wins!`

Hope this helps! If you have any questions don't hesitate to ask ]]>

` ``:If max(X={0,17 :1+15not(X→X and :If max(Y={0,9 :1+7not(Y→Y`

This is the way it works:

:If max(X={0,17

This compares the real number X to a list, {0,17}. When you compare a real number and a list using =,<,>, etc. a new list with the same dimensions as the list given is created, and each value is a 1 or a 0, depending on if the real number is equal to it. So if X is 17, X={0,17 will give the answer {0,1}. The max( command looks for the biggest value in that list, so if X is equal to 0 or 17, a value in the output list will be 1, so the max( command will return 1, which starts the If statement. If X is not equal to either value, then the max( command will read the largest value, 0, and therefore not trigger the If statement.

:1+15not(X→X

In this part, we look at X. If X is equal to 0, not(X will output 1, which is multiplied by 15, and then is added to 1, setting X to 16. If X is equal to 17, the not(X will produce 0, and 0 x 15 is 0, which is added to 1, setting X to 1. In this way, if the player is at X=0, 16 becomes the new X. If the player is at X=17, 1 becomes the new X.

Edit: I'm not sure why this is indenting oddly, and I don't know how to fix it.

]]>You only need `End` statements when you are closing `For(`, `Repeat`, and `While` loops.

Also, if you want better Pi symbols for reference…

` ``𝜋 𝛑 𝝅 𝞹 ℼ`

Don't paste those directly in TI-Connect CE, it won't work ]]>

One thing that isn't working (Only one). It might be my mistake and not yours. I am not sure. The code below didn't seem to work. When either of the characters goes off-screen it will give me an ERR:DOMAIN. I may have typed it in wrong???

` ``:If X=17 :1->X :If X=0 :16->X Could be :If max(X={0,17 :17not(X→X`

This is the "revised edition" :)

` ``:ClrDraw :ClrHome :8→X :3→Y :1→Z :1→R :1→G :1→H :8→A :5→B :0→K :While 1 :ClrHome :Output(R,Z,"* :Output(G,H,"* :Lbl θ :Output(Y,X,"i :Output(B,A,"∏ :getKey→K :Y+(K=42)-(K+32)→Y :X+(K=43)-(K=41)→X :A+(K=26)-(K=24)→A :B+(K=34)-(K=25)→B // this is the part that didn't work :If max(X={0,17 :17not(X→X :If max(Y={0,9 :9not(Y→Y :If max(A={0,17 :17not(A→A :If max(B={0,9 //end of part :9not(B→B :If A=H and B=G or A=Z and B=R :Goto 1 :If X=H and Y=G or X=Z and Y=R :Goto 2 :If K=31:Then :Output(R,Z," //With 1 space :randInt(1,16)->Z :randInt(1,8)->R :Output(R,Z,"* :End :If K=15:Then :Output(G,H," //with 1 space :randInt(1,16)->H :randInt(1,8)->G :Output(G,H,"* :End :End // I don't know if this end is needed :Lbl 1 :ClrHome :Output(4,5,"I WINS! :Return :End :Lbl 2 :ClrHome :Output(4,5,"∏ WINS! :Return :End`

Also, Would you like a shoutout on my youtube channel for helping me with this??

]]>I am reading up on all the things that you said to read. They are VERY helpful. Thank you so much!!!

]]>Firstly, I would recommend reading through the page on Piecewise expressions. A lot of your code could be super improved by using them, and it would also make the code run faster, which is important for a game like this.

Secondly, the code for looping around the screen is also repetitive and slow.

Thirdly, your code for placing the mines is *really* slow, because you are running Lbl and Goto commands, and Goto commands read through the entire program to find the correct Lbl command. In this case, you can remove the need for a Goto entirely.

Fourthly, (and this is a smaller one), you don't need to redraw the mines every single game loop. Just draw them once before Lbl θ, and then the code for placing a new mine will clear out the old mine and draw a new mine.

Fifthly, (is that a word? I'm not sure) the code for testing if the game is over can be improved. Try this:

Sixth of all, you have a memory leak, since you are using Goto commands to exit out of a loop. However, I don't use Goto

commands very often, so I have forgotten how to fix that.

Seventh, don't use Stop. It can lead to bugs with certain programs, and I believe it can mess up a lot if used in a shell. Always use Return.

And eighth, you mentioned that you couldn't find certain symbols, like →,∏,θ, and i. For the first three, try using the "Char" box in the corner of the screen. As for i, the imaginary number, I typically just write it as a regular i.

Keep up the good work! I noticed that you have a lot of stuff on your YouTube channel!

Edit: The pi I wrote above doesn't seem to have rendered properly. But it's in the Char box, and it works when you put it in a code block.

]]>I am fairly new to Ti-Basic so I am very open to suggestions that all you Pros have :)! Here is the program…

` ``:ClrDraw :ClrHome :16->X :8->Y :1->Z :1->R :1->G :1->H :1->A :8->B :0->K :While 1 :Lbl Theta (I don't know how to get a theta) :GetKey->K :ClrHome :Output(R,Z,"* :Output(G,H,"* :Output(Y,X,"i (the I from [2nd] [.]) :Output(B,A,"PI (I don't know how to get a Pi) :If K=32 :Y-1->Y :If K=41 :X-1->X :If K=43 :X+1->X :If K=42 :Y+1->Y :If K=24 :A-1->A :If K=25 :B-1->B :If K=26 :A+1->A :If K=34 :B+1->B :If A=17 :1->A :If A=0 :16->A :If B=0 :8->B :If B=9 :1->B :If X=17 :1->X :If X=0 :16->X :If Y=9 :1->Y :If Y=0 :8->Y :If A=H and B=G :Goto 3 :If A=Z and B=R :Goto 4 :If X=H and Y=G :Goto 5 :If X=Z and Y=R :Goto 6 :If K=31 :Goto 1 :If K=15 :Goto 2 :End :Lbl 1 :randInt(1,16)->Z :randInt(1,8)->R :Output(R,Z,"*" :Goto Theta :Lbl 2 :randInt(1,8)->G :randInt(1,16)->H :Output(G,H,"*" :Goto Theta :Lbl 3 :Lbl 4 :ClrHome :Output(4,5,"i Wins!" :Stop :End :Lbl 5 :Lbl 6 :ClrHome :Output(4,5,"Pi Wins!" :Stop :End`