_________________________________________________________________________ Title: Bricks Version: 1.0 Author: Bård Henriksen / rolhenri@aft.sn.no Model: Casio 9850+ Description: A True Bricks Game for the 9850. _________________________________________________________________________ Command translation: -> Single arrow (located on the keyboard) => Double arrow (press: [shift] [prgm] [f1] [f1]) _ Display, -Disp- (press: [shift] [prgm] [f4]) <= Less or equal (A <= B) >= Greater or equal (A >= B) <> Not equal (A <> B) ^ Raised to the power of / Division or fraction (explain which with a comment) 2rt() Root (2rt(7) is the square root of 7) 4rt() 4th root pi pi (~3.14159265359, low case) e() e(1) (~2.7818281846, low case) E Exponent (5E4 gives 5*10^4) (located on the keyboard, [EXP]) _________________________________________________________________________ Program : ViewWindow 1,127,0,163,0 Plot 18,63 Plot 18,2 Line Plot 53,2 Line Plot 53,63 Line Text 8,84,"BRICKS" Plot 84,50 Plot 100,50 Line Text 28,84,"SCORE:" Text 44,84,"LEVEL:" Fill(0,Mat A) 0 -> S 10 -> L Lbl 1 Text 50,84,Int (11-L) Int (5Ran#+1) -> A Int (5Ran#+1) -> B Int (5Ran#+1) -> C 36 -> O -4 -> N Lbl 2 N >= 2 => Text N,O-4," " ;3 spaces N+6 -> N For 1 -> K To Int L Getkey = 38 => O > 24 => O-4 -> O Getkey = 27 => O < 44 => O+4 -> O Text N,O+8," " Text N,O-8," " If Getkey = 28 Then A -> x C -> A X -> C IfEnd Getkey = 37 => Break Text N,O-4,A Text N,O,B Text N,O+4,C Next (O/4)-4 -> P Mat A[11,P-1] + 1 -> F Mat A[11,P] + 1 -> G Mat A[11,P+1] + 1 -> H 10-(N-2)/6 -> I If F >= 11 Or G >= 10 Or H >= 10 Then Text 16,84,"GAME OVER" Stop IfEnd F G H Goto 2 A -> Mat A[F,P-1] B -> Mat A[G,P] C -> Mat A[H,P+1] F -> Mat A[11,P-1] G -> Mat A[11,P] H -> Mat A[11,P+1] S + 2 -> S Text 34,84,S L - 0,05 -> L 1 -> V Lbl 4 For 1 -> U To 9 V >= 7 => Goto 7 If Mat A[U,V] =\= 0 And Mat A[U,V]=Mat A[U,V+1] And Mat A[U,V+1]=Mat A[U,V+2] Then U -> Y V -> Y Lbl 5 Mat A[X+1,V] -> Mat A[U,V] Mat A[X+1,V+1] -> Mat A[X,U+1] Mat A[X+1,V+2] -> Mat A[X,V+2] Isz X X >= 9 => Goto 5 Mat A[11,V] >= 1 => Mat A[11,V] -1 -> Mat A[11,V] Mat A[11,V+1] >= 1 => Mat A[11,V+1] -1 -> Mat A[11,V+1] Mat A[11,V+2] >= 1 => Mat A[11,V+2] -1 -> Mat A[11,V+2] S + 15 -> S IfEnd Lbl 7 U <= 2 => Next If Mat A[U,V] =\= 0 And Mat A[U,V] = Mat A[U-1,V] And Mat A[U-1,V] = Mat A[U-2,V] Then U -> X Lbl 6 X <= 9 => Mat A[X+1,V] -> Mat A[X-2,V] X > 9 => 0 -> Mat A[X-2,V] Isz X X <= 10 => Goto 6 Mat A[11,V] - 3 -> Mat A[11,V] S + 15 -> S IfEnd Next Isz V V <= 8 => Goto 4 1 -> V Lbl 3 For 1 -> U To 10 Mat A[U,V] -> W W = 0 =< Text 62-(U*6),16+(V*4)," " ; 1 space W =\= 0 => Text 62-(U*6),16+(V*4),W Next Isz V V <= 8 => Goto 3 2 -> N Text 34,84,S Goto 1 _________________________________________________________________________