So here is the full game ! I do of course know there are plenty of ways to improve it, I'm only starting to understand how my TI works :p

The name actually comes from a french word (yes, I'm french.), "défoncé" which means, in context, high or stoned. You can therefore guess how it was born and/or how we play it.

It includes features that were added over time, and I'm only giving the rough code since I own a TI-82 stats (ugh, that's what everyone has at school :p), and cannot transfer the file(s) to my computer. sadly.

I think that's enough said, let's explain the game. Basically, 2 modes available. SinglePlayer and MultiPlayer.

In MultiPlayer, you enter the number of players (from 2 to 10). Then each player, one after another, takes the calculator, reads the number (not out loud if possible, it can give an advantage to other players), and then does hardcore maths in his head for about 4 minutes, trying to figure out the square root of that one number as precisely as possible (same number for all players). Finally, the calculator is handed back to the game master once the last player finished, and that one will announce the number, its square root, and each player's answer. Then the calculator shows how far from the exact answer you were, and gives you a little message, based on how close you were.

SinglePlayer mode is exactly the same, except you play alone, and at the end of each game, you'll be asked if you want to continue, and the given your total precision and average per game.

Code:

```
:20→dim(∟DEF
:6→dim(∟HS
:GraphOff
:AxisOff
:FnOff
:0→Xmin
:94→Xmax
:0→Ymin
:62→Ymax
:ClrHome
:ClrDraw
:RecallPic 0 // not able to import it sadly, but it's just an empty screen with the name written at the top
:For(L,7,87 // loading bar ! yay
:Pt-on(L,7
:Pt-on(L,8
:getKey→K
:If K=105
:87→L
:End
:For(L,1,100 // time waster so you can contemplate the beautiful loading screen :>
:End
:Lbl 0
:Menu(" DEFONCAY","Multiplayer",A,"Singleplayer",B,"Highscores",C,"Reset HS^",D,"Exit",θ
:Lbl A
:ClrHome
:Disp "Number of
:Disp "Players
:Input ": ",N
:ClrHome
:0→E
:If (N>10)+(N<2)+fPart(N
:Then
:1→E
:Output(2,8,"Error :
:Output(3,6,"Invalid
:Output(4,4,"Number of
:Output(5,5,"Players !
:Pause
:ClrHome
:End
:If E
:Goto 0
:1→M
:9^99→G
:Repeat fPart(B
:randomInt(50,999→A
:√(A→B
:End
:Lbl X
:ClrHome
:For(I,M,N
:Output(2,5,"Give to
:Output(3,5,"Player
:Output(3,12,I
:Output(5,3,"Press Enter
:Pause
:ClrHome
:Disp "Square Root
:Output(1,13,A
:Input ": ",Str0
:For(X,1,length(Str0
:If not(inString("1234567890.",sub(Str0,X,1
:Then
:length(Str0→X // Shuts the For loop
:"0→Str0 // We'll use 0 to detect a cheat. That means you can't enter 0 as your answer
:End
:End
:expr(Str0→∟DEF(I
:∟DEF(I)-B→∟DEF(I+10 // I use ∟DEF(1 to 10) to store answers and ∟DEF(11 to 20) to store precision (distance from B)
:ClrHome
:If 0=∟DEF(I
:Then
:Disp ""," Don't even try"," to cheat pls."
:Pause
:ClrHome
:End
:End
:Output(2,4,"Return to
:Output(3,4,"the Master // I used to have my name written here lol
:Output(5,6,"Or [+]
:Output(6,4,"To add an
:Output(7,3,"Extra player
:Repeat (K=95)+(K=105
:getKey→K
:End
:ClrHome
:0→E
:If (K=95)(N≤10
:Then
:N+1→N
:N→M
:1→E
:End
:If E
:Goto X
:Disp "Square Root
:Disp "is :
:Output(1,13,A
:Output(2,6,B
:For(I,1,min(N,5
:If 0=∟DEF(I
:Then
:Disp " CHEAT ! // 9 spaces before "Cheat !"
:Else
:Disp ∟DEF(I
:End
:End
:Pause
:For(I,6,N
:If 0=∟DEF(I
:Then
:Disp " CHEAT !
:Else
:Disp ∟DEF(I
:End
:End
:If N>5
:Pause
:ClrHome
:For(I,1,N
:Output(2,2,"Player : // 4 spaces before ":"
:Output(2,9,I
:Output(4,2,"Precision :
:∟DEF(I+10→X // Storing it because we are going to use it a lot of times
:Output(5,2,X
:If 0=∟DEF(I
:Then
:Output(7,2,"Cheater !
:Pause
:Else
:If X<G // G is used to find each game's best player
:I→H
:End
:If X<0.001
:Output(7,2,"God of Maths !
:If X≥0.001 and X<0.01
:Output(7,2,"LEGENDARY
:If X≥0.01 and X<0.05
:Output(7,2,"R U Nerd ?
:If X≥0.05 and X<0.1
:Output(7,2,"Well played.
:If X≥0.1 and X<1
:Output(7,3,"Not bad
:If X≥1 and X<5
:Output(7,2,"Camel ! // This is a reference to my math teacher I had when I was 16. He'd call us that (in french of course) when we did something bad in a math exercice.
:If X≥5 and X<15
:Output(7,2,"You high ?
:If X≥15
:Output(7,2,"Don't even try...
:Pause
:ClrHome
:If X<∟HS(1 // Highscore system yay !
:Then
:∟HS(2→∟HS(3
:∟HS(1→∟HS(2
:X→∟HS(1
:Str2→Str3 // Using String 1 to 3 to store names in highscores
:Str1→Str2
:Disp "High score ! (1)
:Disp "Your name :
:Disp " (8 letters)
:Input ":",Str1
:sub(Str1,1,min(8,length(Str1→Str1
:Else
:If X<∟HS(2
:Then
:∟HS(2→∟HS(3
:X→∟HS(2
:Str2→Str3
:Disp "High score ! (2)
:Disp "Your name :
:Disp " (8 letters)
:Input ":",Str2
:sub(Str2,1,min(8,length(Str2→Str2
:Else
:If X<∟HS(3
:Then
:X→∟HS(3
:Disp "High score ! (3)
:Disp "Your name :
:Disp " (8 letters)
:Input ":",Str3
:sub(Str3,1,min(8,length(Str3→Str3
:End
:End
:End
:End
:ClrHome
:End
:Output(2,3,"Best player
:Output(3,3,"This round :
:Output(3,14,H
:Output(5,2,"Precision :
:Output(6,2,G
:Pause
:ClrHome
:Goto 0 // End of Multiplayer
:Lbl B
:0→P
:0→Q
:Lbl R
:P+1→P
:Repeat fPart(B
:randomInt(50,999→A
:√(A→B
:End
:Disp "Square Root
:Output(1,13,A
:Input ": ",Str0
:For(X,1,length(Str0
:If not(inString("1234567890.",sub(Str0,X,1
:Then
:length(Str0→X
:"0→Str0
:End
:End
:expr(Str0→∟DEF(1
:∟DEF(1)-B→X
:ClrHome
:Disp "Square root
:Disp "is :","
:Disp "Precision :
:Output(1,13,A
:Pause X
:If 0=∟DEF(1
:Then
:Disp "Cheating alone ?
:Pause
:End
:If X<0.001
:Disp "God of Maths !
:If X≥0.001 and X<0.01
:Disp "LEGENDARY
:If X≥0.01 and X<0.05
:Disp "R U Nerd ?
:If X≥0.05 and X<0.1
:Disp "Well played.
:If X≥0.1 and X<1
:Disp "Not bad
:If X≥1 and X<5
:Disp "Camel ! // This is a reference to my math teacher I had when I was 16. He'd call us that (in french of course) when we did something bad in a math exercice.
:If X≥5 and X<15
:Disp "You high ?
:If X≥15
:Disp "Don't even try...
:Pause
:Disp "
:If X<∟HS(4
:Then
:∟HS(5→∟HS(6
:∟HS(4→∟HS(5
:X→∟HS(4
:Disp "High score ! (1)
:Pause
:Else
:If X<∟HS(5
:Then
:∟HS(5→∟HS(6
:X→∟HS(5
:Disp "High score ! (2)
:Pause
:Else
:If X<∟HS(6
:Then
:X→∟HS(6
:Disp "High score ! (3)
:Pause
:End
:End
:End
:End
:Q+X→Q
:ClrHome
:Disp ""," Precison :",Q,"in game(s) // 5 spaces between "in" and "game(s)"
:Disp ""," Average :",Q/P
:Output(4,4,P
:Pause
:ClrHome
:Menu("Continue ?","Yes",R,"Nope",0
:Lbl C
:ClrHome
:Disp " Scores multi :
:Disp Str1,∟HS(1),Str2,∟HS(2),Str3,∟HS(3
:Pause
:ClrHome
:Disp ""," Scores solo :
:Disp ∟HS(4),∟HS(5),∟HS(6
:Pause
:ClrHome
:Goto 0
:Lbl D
:"→Str1
:"→Str2
:"→Str3
:{10,10,10,10,10,10→∟HS
:Disp ""," High scores"," cleared !
:Pause
:ClrHome
:Goto 0
:Lbl θ
:ClrHome
:AxisOn
:Output(1,1,"
```

Sooo… That's it. one of the biggest flaws in my opinion is the fact that High score names are stored in a String that might be needed to store something else in another program.

Some people have been (implicitly) requesting it, so here it is :3

I might give you the formulas I (we) use to find precise results and be a total boss.