Blijbol.nl

Blijbol, happy business   Dutch English

Links About Blijbol Guestbook
Home News Games Software Game Maker
Downloaded 310 times
TIGRS™: family friendly

Decoder

Mastermind in digits

Description

In Decoder you are a codebreaker who has to guess a secret code. The game is similar to and inspired by Mastermind, Bagels and "Bulls and Cows".

Features




Codes

Licence: You are only allowed to change the code below for private usage. Any adapted version of the program below cannot be distributed. The names 'Jeroen van der Gun' and 'Blijbol', and the website 'www.blijbol.nl' must remain, and have to be easily viewable from within the program. Copyright © 2007 Jeroen van der Gun.

Note spaces before line ends!
prgmDECODER
::
:Full
:Normal
:Float
:{4,4→dim([J]
:Lbl C
:ClrHome
:Disp "","","Blijbol","Happy business","","www.blijbol.nl
:For(G,1,180
:End
:Disp "","Decoder v1.0","
:For(G,1,70
:End
:Output(7,1,"(C) 2007 Jeroen
:Output(8,1,"van der Gun
:Pause 
:Lbl M
:ClrHome
:Disp "DECODER","1:Start game","2:[
:If S
:Output(3,4,"*
:Output(3,5,"]May contain
:Disp "     same digits","3:[
:If Z
:Output(5,4,"*
:Output(5,5,"]May begin
:Disp "     with zeros","4:About
:Output(8,1,"5:Quit
:getKey
:While Ans≠92 and Ans≠105
:If Ans=22 or Ans=45 or Ans=83
:Then
:ClrHome
:Stop
:End
:If Ans=93
:Then
:If S
:Output(3,4," 
:not(S→S
:If S
:Output(3,4,"*
:End
:If Ans=94
:Then
:If Z
:Output(5,4," 
:not(Z→Z
:If Z
:Output(5,4,"*
:End
:If Ans=82
:Goto C
:getKey
:End
:ClrHome
:Output(8,1,"Thinking     =40
:For(G,1,8
:Output(7,2G-1,"--
:If G<7
:Output(G,5,"=  !¡    =
:End
:randInt(not(Z),9→[J](2,1
:Repeat S or [J](2,2)≠[J](2,1
:randInt(0,9→[J](2,2
:End
:Repeat S or [J](2,3)≠[J](2,2) and [J](2,3)≠[J](2,1
:randInt(0,9→[J](2,3
:End
:Repeat S or [J](2,4)≠[J](2,3) and [J](2,4)≠[J](2,2) and [J](2,4)≠[J](2,1
:randInt(0,9→[J](2,4
:End
:1→H
:0→C
:1→Y
:Output(8,1,"Guess:   ****
:Lbl Y
:1→X
:Lbl X
:1→B
:getKey
:Repeat 0
:If Ans=102
:Then
:0
:Goto I
:End
:If Ans≥92 and Ans≤94
:Then
:Ans-91
:Goto I
:End
:If Ans≥82 and Ans≤84
:Then
:Ans-78
:Goto I
:End
:If Ans≥72 and Ans≤74
:Then
:Ans-65
:Goto I
:End
:If X>1 and (Ans=23 or Ans=24
:Then
:Output(Y,C+X," 
:X-1→X
:Goto X
:End
:If Ans=21 or Ans=105
:Then
:If H=4
:Then
:Output(8,1,"DIY!    
:Else
:Output(8,1,"Hint 
:Output(8,6,H
:Output(8,7,": 
:Output(8,9+H,[J](2,H
:H+1→H
:End
:End
:If Ans=22 or Ans=45
:Then
:Output(Y,C+X," 
:Output(8,1,"Answer: 
:Goto S
:End
:If B=1
:Output(Y,C+X,"+
:If B=3
:Output(Y,C+X,"·
:B+1→B
:If B=5
:1→B
:getKey
:End
:Lbl I
:Output(Y,C+X,Ans
:Ans→[J](1,X
:If X=4
:Then
:Output(8,1,"Checking
:4→F
:For(G,1,4
:[J](1,G)=[J](2,G→[J](3,G
:not(Ans→[J](4,G
:F-Ans→F
:End
:Output(Y,C+6,F
:If F=4
:Then
:Output(Y,C+7,0
:Output(8,1,"Solved! 
:Goto S
:0→P
:For(G,1,4
:not([J](3,G
:For(I,1,4
:If G≠I and Ans and [J](4,I) and [J](1,G)=[J](2,I
:Then
:P+1→P
:0→[J](4,I
:End
:End
:End
:Output(Y,C+7,P
:If Y=6
:Then
:If C=9
:Then
:Output(8,1,"Failed: 
:Goto S
:End
:9→C
:1→Y
:Else
:Y+1→Y
:End
:If not(F+P
:Output(8,1,"Bagels! 
:If P=1 and not(F
:Output(8,1,"Pico.   
:If F=1 and not(P
:Output(8,1,"Fermi.  
:If F+P>1
:Then
:0→G
:While P
:If G>0
:Output(8,G,",
:Output(8,G+1,"P
:G+2→G
:P-1→P
:End
:While F
:If G>0
:Output(8,G,",
:Output(8,G+1,"F
:G+2→G
:F-1→F
:End
:Output(8,G,".
:While G<8
:G+1→G
:Output(8,G," 
:End
:End
:Goto Y
:End
:X+1→X
:Goto X
:Lbl S
:For(G,H,4
:Output(8,9+G,[J](2,G
:End
:Pause 
:Goto M

Version 1.0 (stable)

Release date: 1 August 2007
Language: English
System requirements: Texas Instruments graphing calculator running TI-83 Plus or TI-84 Plus operating system (Silver Edition is also fine), 1710 bytes free RAM memory or archive space for storage (during use more RAM memory is needed)

Project status

A stable version of this product has been released. The project was announced at 24 August 2007.

Credits

This game has been created by Jeroen van der Gun in TI-Basic.

More for your calculator



Comments

No comments have been posted yet. Use the form to post one.

Add a comment




5 × 10 =
Blijbol =