



1) Getting Started
2) Simple Routines (Including Reading Keypresses)
3) Variables
3a) Strings, Lists, And Matrices; Explained.
4) Displaying With A Dialog Box
5) Graphs/Pictures
6) For You Advanced Ones
6a) Random Numbers
6b) 'ElseIf Then' Statements
6c) 'Try Else EndTry' Statements.
6d) Greylib; Explained And How to Use.
6e) Cool Things With Modes and Graphs.
6f) Toolbars
7) An Actual Program For YOU
8) Closing
-----------------------------------------------------------------------------
1) Getting Started
-----------------------------------------------------------------------------
Well, The First Thing You Need To Do Is Know How To Set Up Your Program. After The Setup, Your Actual Program Is Very Short! The First Thing You Need to Do Is Clear The Viewing Area. You Achieve This By Using the Following:
:ClrDrw "Clears Drawing Part Of The Graph
:ClrGraph "Clears The Graph From the Screen
:ClrHome "Clears The Home Screen, This Isn't Really Needed And Can
Be Omitted
:Disp "" "Sets The Current Screen To The 'Prgm IO' Screen
:ClrIO "Clears The 'Prgm IO' Screen
:ClrTable "Clears The Current Table, This Isn't Really Needed And Can
Be Omitted
At The End Of The Program, Use The Same Routine, Just Add 'DispHome'
To The End.
You Can Display Messages On The IO Screen By Using The Disp Function
Such That To Display 'Hello World' You Would Type :Disp "Hello World"
Note: " Is Quotation Marks.
You Can Also Display To A Certain Place On The Screen By Using
The 'Output' Function. Output Displays Your Message Starting On The
Specified Pixil. We Will Work More With Pixels Later. So, Do
Display 'Hello World' Starting On Pixel (9,25) Type ':Output
25,9,"Hello World"' Be Sure To Do y,x Not x,y.
Not Only Can you Display, But You Can Make It Display A Message
AND Wait For [ENTER] To Be Pressed. You Can Achieve This By Using
The 'Pause' function. Without A Following Variable(Explained Later)/Message,
Pause Just Waits For [ENTER] To Be Pressed. Otherwise, Pause Will
Display The Following Variable/Message, And Wait For [ENTER]. Example:
'Pause "Hello World"'
-----------------------------------------------------------------------------
2) Simple Routines (Including Reading Keypresses)
-----------------------------------------------------------------------------
Perhaps The Most Simple Of All Routines Is The "Loop EndLoop"
Routine. Simply Type 'Loop', Then The Commands You Want Executed, And Then
'EndLoop'. There Is, However, One Problem To This. The Loop Must
Be Broken With An 'On' Press By The User, Or With An 'Exit' Command.
The 'Exit' Command Can Be Anywhere In The Loop, And It Will go To The Line
After 'EndLoop'.
The Other Way To Move from An 'Loop EndLoop' Statement Is a Form
Of A Loop Itself. 'Lbl' And 'Goto'. You Can Use 'Lbl' To Label
A Point In You Program A Certain Name. You Do This By Using 'Lbl
[Label Name]' Such That For A Label Of 'a1' You Would Type 'Lbl a1'.
You Use The 'Goto' Command In The Same Fashion. 'Goto a1' Will Go
To The Label We Previously Labeled. You Cannot, However, Go To A
Label Within Another Program, It Must Be Within The Program With Which
You Are Working.
Another Loop Is With Another Program Itself. You can Create
Another Program, A 'SubProgram' If You Will, And Call It From your Main
Program. From There You Can Do The Same, And So On. To Call
A Program, Simply Type It In As It Would Appear On The Home Screen.
So, to Call A Program Named 'greylib' Type 'greylib()'¡!¡
'While EndWhile' Loops Are A Form Of 'If Then' Statements Which
Will Be Covered Later. It Is Used In This Way: 'While [Condition]:[Command]:EndWhile'
The Condition If A Test, Something Similar To: 'While x>1'. While
The Condition Is True, It Runs the Commands Down To 'EndWhile' And Then
Checks The Condition Again, And Repeats. It Will Not Run If The Condition
Is Originally False.
'For EndFor' Is A Loop That Run A Specified Number Of Times.
It Is Used In This Fashion: 'For [Variable],[Count Start],[Count End],[Increments]:[Command]:EndFor'.
Count Start Is The Number Originally Stored Into The Specified Variable
(By The Calculator), and Then That Number Goes Up My [Increments] Until
It Is Equal To Or |Count End|<|Variable+Incriment|. (|| Means
The Number Is Positive). So, To Count Using 'a' From 25 To 75 By
2, Type: 'For a,25,75,2'. Also Note, When Increment Is 1, It Can Be Omitted
Because 1 Is The Default Increment.
So, Lets Make A Program¡!¡ this Program Is A GetKey
Routine (It Read The Keypress).
:Prgm
:Local x,y,z,t
:ClrDrw " Startup
:ClrGraph
:ClrHome
:Disp ""
:ClrIO
:ClrTable
:0»x " '»' Is The 'Sto' Key. This Will Be Covered
Later In 'Variables'
:While x<>264 " '<>' Is 'Not Equal To'. Here Is the
Loop!
:getKey()»x " Gets The Keypress
:If x>0 " Will Be Covered In 'Variables'!
:Disp x " Displays The Calculator's Code Of the Keypress
:EndWhile
:ClrDrw "Ending
:ClrGraph
:ClrHome
:ClrIO
:ClrTable
:DispHome
:EndPrgm
-----------------------------------------------------------------------------
3) Variables
-----------------------------------------------------------------------------
Variables Are Small Bits Of Information That Can Be Varied (Hence
the Name Variables). There Are Multiple Ways Of Varying Them.
The First, And Easiest, Is Storing A Value To The Variable. This
Is Accomplished With '[Value]»[Variable]' Where '»' Is The
'Sto' Key. This Will Put The [value] InTo The [Variable]! So, To
Store 0 Into x You Would Type '0»x'!
In Order To Keep From Cluttering The User's Calculator, You Need
To Get Rid Of Variables That You Have Used, And Are No Longer Needed.
The Best Way To Do This Is the 'Local' Commend. This Command Supposedly
(I Have Not Checked This) Keeps The Current Value Of All Of the Specified
Variables And Will Change Them Back After The Program. If The Variable
Did Not Exist, the Program Deletes The Variable At The End (Or Whenever
The Program Stops For Any Reason). 'Local' Is Very Easy To Use, Simply
Type 'Local [Variable]'. You Can do This for as many Or As Little
Variables As You Need With One 'Local' Statement. Simply Separate
The Variables With Commas!
You Can Also Test Variables (Check Statements) With Them.
This Is Accomplished With The 'If Then ElseIf Else EndIf' Statement(s).
Not All Of These Are Needed In Every Case, And In Some Cases, Some More
Than Once. 'If [Condition]' Simply Test If The Condition Is True,
And If It Is, It Runs The Preceding Line, Else It Skips The Preceding Line.
So, If You Want To Display 'M' If x>0, Type 'If x>0:Disp "M"'. It's
As Simple As That. If You Want To Run More Than One Line, Use The
'If Then EndIf' Statement. Simply Use It As 'If [Condition] Then:[Line
To Execute If Condition Is True]:[Same]:EndIf:[Skips To Here Is Condition
Is False]'. You Can Use As Many Lines In Between 'If [Condition] Then'
And 'EndIf' As You Want. 'Else' Goes In Between The 'If [Condition]
Then' And 'EndIf' Statements. 'If Then' Then Runs All Statements Up To
The 'Else' If The Condition Is True. If It Is False, It Runs From
The 'Else' Statement To The 'EndIf' Statement.
'ElseIf Then' Statements Will Be Covered In The 'For You Advanced
Ones' Section.
Other Values Besides Just Plain Numbers Can Be Stored In A Variable.
Strings, List, Matrices, etc. Can Also Be Stored.
-----------------------------------------------------------------------------
3a) Strings, Lists, And Matrices; Explained.
-----------------------------------------------------------------------------
Strings Are Quite Simple. Think Of A String. Ya Know, Thread.
Well, That's, In A Sense, What A 'String' For a Calculator Is. It
Is A String Of Letters/Words, If You Will. A String Might Be "Hello
World!". The Only Thing You Must Remember With A String, Is A String
HAS To Be Surrounded By Quotation Marks. After That, There's Not
Much More To Explain. They Behave As Any Other Variable.
Lists Are Exactly What They Sound Like, Lists. They Can
Be A List Of Numbers, Strings, Or Both (Equations Work Too). Lists
Are Surrounded With '{}', And Contain Spaces Between Each Item In The Lists.
The Easiest Way To Make A List In A Program Is 'newList([Number Of Elements])»[Variable]'
Where '»' Is The 'Sto' Key. The Number Of Elements Is Exactly
That, the Number Of Elements The List Contains. To Store A Variable
(Not A List Or Matrix) to An Element, Simply Type '(Variable)»(List)[(Element
Number)]'. Note: The Brackets MUST Be There! You Can Recall
An Element With The Same '(List)[(Element Number)]' Way.
A Matrix Is Just A Bunch Of Lists Piled On Top Of Each Other.
Because Of The, A Matrix Has Both A Row And A Column Number. You
Create A Matrix With 'newMat([Number Of Rows],[Number Of Columns])»[Variable]'.
You Store And Recall Elements Is The Same Fashion At Recalling A List,
Except You Must Put The Row Before The Element Number. Example: '(Variable)»(Matrix)[(Element
Row),(Element Number)]'.
To Put A Certain Variable (Not A Matrix Or A List) Into Every
Element In A List Or Matrix, Use The 'Fill' Command. You Use It By Typing
'Fill [Variable],[List Or Matrix]'.
-----------------------------------------------------------------------------
4) Displaying With A Dialog Box
-----------------------------------------------------------------------------
Assuming That You Have Read My Previous Section, And Fully Understand
Them, I Will Now Tell You How To Make Your Program Look Really Neat!
'Dialog EndDlog' Is A Way To Create Really Nifty Boxes In Which The User
Can Enter Information, Read Information, Or Select From Choices That You
Have Specified. The First Thing You Must Do Is Get The 'Dialog EndDlog'
Statement From The 'I/O' Menu In The Program Editor. Then, IN BETWEEN
THESE STATEMENTS Type 'Title "[Title For Box]"'. There Can Only Be One
Title Per Box. The Title Will Go Up In Its Own Special Place.
You Can Also Enter Text, Request A String, Or Have A Drop Down Box With
Answers For The User To Select. There Can Be 16 Of These, But That's
Total, Not A Mix Of 16 Of Each. 'Text' Will Simply Display The following
Text Which I Believe Can Only Be 26 Characters Long. So, Do Display 'Hello
World!' You Type 'Text "Hello World!"'.
To Request A String, You Type 'Request "[Text]",[Variable]'.
The Text Will Be Displayed In Front Of The Request Box, And Will Have An
':' Added To The End Of It. If There Is Already A String Stored In
The Variable, That String Will Appear In The Request Box. Variable
Has Something Other Than A String Stored In It, An Error Will Appear, So
Be Careful. The Variable Will Contain The String That The User Answered
After The 'EndDlog' Statement. To Have Choices For The User To Select,
You Can Use The 'DropDown' Statement. The 'DropDown' Statement Is
Use In This Form: 'DropDown "[Text]",[List],[Variable]'. The List
Can Either Be A Variable Or A List That You Type In. The Variable
Will Contain The Element Number Of The List That Was Selected. So, To Create
A DropDown In Your Dialog Box With 'Options:' As The Text Before The Choices,
With 'Start', 'Info', 'Help', And 'Quit' As Choices, You Type:
'DropDown "Options:",{"Start","Info","Help","Quit"},x'. Take
Care That Every Item In The List I A String!!! If The User Selects 'Start'
Then x Will Be 1, And If The User Select 'Quit' Then x Will Be 4, And etc.
NOTE: Only 'Text', 'Request', 'Title', And 'DropDown' Statements
Can Be Inside The 'Dialog EndDlog' Statements. ALSO NOTE: The Text In The
'Request' And 'DropDown' Statements Can Be Replaced With A Variable.
The Final Form Of A Dialog Box Is A 'PopUp' Statement.
This Statement CANNOT Be Used In The 'Dialog EndDlog' Statement.
It Is Used Much The Same Way As The 'DropDown' Statement, Omitting The
Text. So, In Graphical Terms, It Is Used 'PopUp [List],[Variable]'.
-----------------------------------------------------------------------------
5) Graphs/Pictures
-----------------------------------------------------------------------------
Ahhh, Yes. Pictures, Graphics, Sprites (Z80 & 68k Reference),
etc. You Just Want To Make Your GAMES More GRAPHICAL! Well, I Don't
Blame You. In My Opinion, Each Program (I Really Mean Game) Should
Only Consist One Main Program. This Means No SubPrograms, High Scores,
Or Pictures. You Can Call Pictures That Have Been Previously Made
From A Program, You Just Need The Correct Routines/Statements. Well,
I Suggest You Get A Pencil/Pen And Paper, Because You're Going To Want
To Take Notes. If You Have Not Read My Previous Sections, Even If
You Are Advanced Or Even An 'Expert', This Is Going To Be The Hardest Section
To Understand So Far.
With That Out Of The Way, I Can Now Tell You That I Lied, This
Section Is Easy, Once You Get A Hang Of It. There Are Multiple Types
Of Drawing That I Will Teach You In This Section. Drawing With Pixels,
Drawing Lines With Pixels, Storing/Recalling Pictures, And Pixel Testing.
To Draw, The First Thing You Need To Do Is Clear The IO Screen
And The Graph Screen(I Really Don't Know Which One It Uses!). Then,
You Need To Set The Mode To Function Graphing(You Don't Need To, Be That
Way You Can Use Points Instead Of Pixels (I Won't Teach That, I Think It
Rather Crude, But Sometimes You Need It). To Set The Mode Of Anything,
Go To The 'Mode' Section In The Program Editor. There You Can Change
The Graphing Mode To Whatever You Want (There Are Different Reasons For
Everything). Then, You Need To Turn The Axes Off. (DO NOT USE 3D
Graphing Mode!) To Turn Off The Axes, Type 'setGraph("Axes","Off")'.
It's As Simple As That!
Now That You Have No Axes, You Can Draw. 'PxlOn' Is The
Easiest And Best Statement To Learn. You Use It 'PxlOn [y],[x]'.
(This Is The Algebraic 'y'&'x'). Using This Statement Will Turn
On(Make It Black) The Specified Pixel. 'PxlOff' Works In the Same Fashion,
Except It Turn The Pixel Off(Makes It White). Then Comes The 'PxlChg'
Statement. Same Fashion, Except If The Pixel Is On, It Turns Is Off; And
Vice Versa.
_____ That's A Line, Right? Of Course! So? Want To Draw
One? It's Easy Too! 'PxlLine' Works Simply By Asking The Starting
'x'&'y', And The Ending 'x'&'y'. So, to Draw A Line, Type
'PxlLine [Start y],[Start x],[End y],[End x],[Draw Mode]'. Draw Mode
Determines Weather The Line Is Black Or White. If It Is Black, Draw
Mode Can Be Omitted. For White, Draw Mode Should Be 0.
To Store A Picture, You Need The 'StoPic' Statement. It
Is Used 'StoPic (Variable)' Where The Variable Is The Name Of The Picture.
This Will Store The Current Graph Screen To The Variable You've Chosen.
You Can Now Recall The Picture. You Can Also Chose Where To Store The Picture,
And How Big The Picture Is. You Do This By Putting 'StoPic (Variable),(y
Start),(x Start),(Width),(Height)'. If You Omit Width And Height,
It Will Store As Much As It Can. If the Starting Pixel Is Ommited,
Then Width And Height MUST Be Ommited, And It Starts On 0,0.
To Recall A Picture, You Need The 'RclPic' Statement. It
Is Used 'RclPic (Variable)' Where the Variable Is A Picture Previously
Stored. The Only Problem With The 'RclPic' Command Is That It Does
Not Clear The Graph Screen When You Use It. It Just Changes The Pixels
Of The Graph Screen That You Stored To On. To Make It Simpler, Think
Of The Graph Screen As A Matrix. There Are Two Matricies, The One
You Stored, And The Current One. The One You Stored is Recalled Onto
The Current One. If A Space In The Stored Matrix Is '1', Then It
Changes The Corresponding Space In The Current Matrix To '1'. However,
If The Space In The Stored Matrix Is '0', It Does Nothing To the Current
Matrix. To Provent This From Hapening, Use The 'RplcPic' Statement.
It Is Used In The Same Manner As The 'RclPic', Except The Current Graph
Screen Is REPLACED With The Stored Picture. If You Want To Recall
a Picture In A Certain Spot, You Can Use '(Statement) (Variable),(y Pixel),(x
Pixel)'. It Will Recal The Picture At The Values You Put In. If The
x And y Pixels Are Omitted, It Will Recall The Picture At 0,0.
There Are Many Other Pixel Drawing Statements, But I Will Not
Get Into Them Because They Are Explained In The Manual Very Well; And You
Do Not Use Them As Much.
To Display Text At A Certain Pixel ON THE GRAPH SCREEN You Use
The 'PxlText' Statement. I Will Barely Touch On This, So Follow Me.
It Is Used In This Manner: 'PxlText (String To Display, Either Variable
Or Accual String),(y Pixel),(x Pixel)'. No Part Of This Statement Can Be
Ommited. It Is a Simple As That. BE SURE That The Variabl IS
A STRING!!!
-----------------------------------------------------------------------------
6) For You Advanced Ones
-----------------------------------------------------------------------------
Well, If You Have Read The Tutorial Up To Here, And Fully Understand
It, Then You Are Almost REady For This Section. Read The Tutroial
Again, And Make A Simple Program, Then You May Read Further. If You
Meet These Requirements, Then Procede.
The First Of The Statement I Must Explain Is The 'int(' Statement.
It Is Used 'int([Number/Variable])'. It Will Return The Number As
A Whole Number (No Decimal). It Will NOT Round, However.
To Round Number, You Can Use The 'round(' Statement. It
Is Used In This Manner: 'round([Number/Variable],[Didgets])' Where Didgets
Is The Number Of Didgets After The Decimal It Will Round To. I Sure
Hope You Know What Rounding Is, If You Don't, Go Back To 3rd Grade!
Didgets Can Be Ommited If You Want It To Round To A Whole Number.
One Really Useless Statement Is The 'Loop EndLoop' Statement.
It Creates And Endless Loop (Catch 22) Between The 'Loop' And 'EndLoop'
Until The 'Cycle' Command Is Given. 'Cycle' Will Stop Any Loop (Except
For 'Lbl Goto' Statements)!
-----------------------------------------------------------------------------
6a) Random Numbers
-----------------------------------------------------------------------------
Random Numbers Are Number That Are Generated Totally Randomly (Hence The Name RANDOM NUMBERS). This Means That (Hopefully) Every Number Has An Equal Chance Of Being Picked. To Get A Random Number, You Use This Statement 'rand([Number/Variable])'. If Number/Variable Is Omitted, It Gives You A Decimal Between 1 and 0 (Non-Inclusive), Else It Gives you A Whole Number Between 0 and The Number You Put (Zero Is Non-Inclusive, But Your Number Is Inclusive).
-----------------------------------------------------------------------------
6b) 'ElseIf Then' Statements
-----------------------------------------------------------------------------
Now Would Be A Good Time To Have A Break, Seeing That I Just Had
Mine. That Way Your Brain Can Relax, For Once.
'ElseIf Then' Statements Are Really Just Fancy 'If Then EndIf'
Statements. You HAVE To Use An 'ElseIf Then' Statement In A 'If Then
Else EndIf' Statement. Here's An Example:
:rand(10)>x 'NOTE: > Is Sto> ! This Generates A Random Number!
:If x>7 Then
:(Statement[s] If x>7)
:ElseIf x>5 Then
:(Statement[s] If x>5 AND x=<7)
:ElseIf x>3 Then
:(Statement[s] If x>3 AND x=<5)
:Else 'Importaint!!!! Not An 'ElseIf'.
:(Statement[s] If x=<3. This Runs If "All Else Fails".)
:EndIf
Now It Becomes Simple, Eh? If Not, Then Think Of The 'If'
Statements As A Sentence. "If Intrest Rates Drop Then There Is Inflation
Else If Intrest Rates Sky-Rocket Then There Is 'Deflation'." -heh
heh
-----------------------------------------------------------------------------
6c) 'Try Else EndTry' Statements
-----------------------------------------------------------------------------
Think Of Programming As English. If You Get F's In English,
You Are Not Entirely Screwed. All You Need Is Basic English.
"Try Else EndTry' Statements Keep Errors Out Of Your Hair.
Here Is The Easy Way To Look At It: If You 'Try' Something New, And
It Works, Cool, 'Else' You Have To Erase Your Error And Stop Trying It!
Example:
:"asdf">x 'Note: > Is Sto>
:Try
:x+2>x 'Create Error
:Else
:ClrErr 'Clear The Error
:EndTry 'End 'Try' Statement.
This Statement Creates NO LOOPS!!! Also, It Somethimes
Works On [ON] Being Pressed, Sometimes Not. Try It For Yourself!!
-----------------------------------------------------------------------------
6d) Greylib; explaied And How To Use
-----------------------------------------------------------------------------
Greylib Is Quite A Simple Program, That Makes It Easy For BASIC Programmers To Impliment Greyscale. Greyscale On A Calculator Is Just Simply Pictures Flashing. The Pictures Flash So Fast, You Mind THINKS That It's Seeing Greyscale, But It's Not Really. To Use Greylib, Simply Store To Pictures To Be Rotated Into 'Pic' Variables. The First One Is 'Pic1', The Next 'Pic2' And So On. Read The Greylib Documentation For More Info.
-----------------------------------------------------------------------------
6e) Cool Things With Modes And Graphs
-----------------------------------------------------------------------------
Yes, Graphs CAN Be Fun, If Used In Games. You Can Use The 'Mode' Menu In The Program Editor To Change [MOST] Of The Calculator's Modes. The Only Other Mode Change I Think You Might Need Is 'setGraph('. This Can Be Used To Turn The Axes Off, 'setGraph("Axes","Off")', Or Turn The Axes On, 'setGraph("Axes","On")'. It's That Simple!!!
-----------------------------------------------------------------------------
6f) Toolbars
-----------------------------------------------------------------------------
Toolbars Look Cool, And Are Easy!!! Use Simple Put The 'Toolbar
EndTBar' Statements In The Program Editor, And You're Half-way done.
You Use The 'Title' Statements To Constitute A Title For Each 'Bar'.
Then You Use The 'Item' Statement For Each Item In That Bar. Items
Can Be Ommited, But If They Are, Title Must Be Used In This Fashion:
'Title (Title),(Label To Go To If Selected)'. Item Is Used: 'Item (Item),(Label
To Go To If Selected)' That's It!!
Custom Toolbars Suck, So I Won't Teach Them, Learn Yourself!!!
But Don't Use Them In Any Good Programs, 'Cause I Hate 'Em!!!!
-----------------------------------------------------------------------------
7) An Accual Program For YOU!
-----------------------------------------------------------------------------
Wow, Finally, An Accual Program. It's Called 'Pxlmaze'.
STUDY IT! It Sucks, So I'm Not Going To Release It, Though.
Prgm
Local x,y,z,t,a,b,c,d,e
setMode("Graph","FUNCTION")
setGraph("Axes","Off")
Lbl a0
ClrDraw
ClrGraph
ClrHome
Disp ""
ClrIO
ClrTable
If getConfg()[20]<70000
Goto a7
50»c:50»d
Dialog
Title "Pixel Maze by David Bowland"
Text "This is a crappy maze game"
Text "that I programmed in less"
Text "than 5 minutes. The maze"
Text "takes about 15 minutes to"
Text "randomize, so be patient!"
Text "2nd plus a key breaks a wall,"
Text "and [ESC] escapes."
EndDlog
0»a:0»b
If getType(mzesve)="LIST" Then
1»x
Dialog
Title "Restore?"
Text "You have a previous game"
Text "saved."
DropDown "Restore it?",{"Yes","No"},x
EndDlog
If x=2
Goto a1
Try
Unarchiv mzesve
Else
ClrErr
EndTry
Try
Unlock mzesve
Else
ClrErr
EndTry
¨mzesve[c*d+1]»x
¨mzesve[c*d+2]»y
2»x:2»y
left(mzesve,c*d)»mzesve
listÐmat(mzesve,d)»t
DelVar mzesve
Goto a2
EndIf
Lbl a1
Text "RANDOMIZING!"
Text "WARNING: This will take a LONG time!"
Disp "Randomizing...",""," %"
newMat(c+1,d+1)»t
Fill 1,t
0»e
For x,2,c-1
For y,2,d-1
e+1»e
Output 21,0,int(100*(e/((c-1-2)*(d-1-2))))
If rand()�0.73
0»t[x,y]
EndFor
EndFor
2»x:2»y
0»t[x,y]
2»t[rand(c-1)+1,rand(d-1)+1]
Disp ""
ClrIO
Lbl a2
0»z
getKey()»z
ClrDraw
If t[x-1,y-1]=1
PxlOn x-2,y-2
If t[x,y-1]=1
PxlOn x-1,y-2
If t[x-1,y]=1
PxlOn x-2,y-1
If t[x+1,y-1]=1
PxlOn x,y-2
If t[x-1,y+1]=1
PxlOn x-2,y
If t[x+1,y]=1
PxlOn x,y-1
If t[x,y+1]=1
PxlOn x-1,y
If z=264
Goto a3
If z=263
Pause
If z=338 and t[x,y+1]=0
x-1»x
If z=344 and t[x+2,y+1]=0
x+1»x
If z=340 and t[x+1,y+2]=0
y+1»y
If z=337 and t[x+1,y]=0
y-1»y
a+1»a
If z=4434 Then
b+5»b
0»t[x,y+1]
EndIf
If z=4440 Then
b+5»b
0»t[x+2,y+1]
EndIf
If z=4436 Then
b+5»b
0»t[x+1,y+2]
EndIf
If z=4433 Then
b+5»b
0»t[x+1,y]
EndIf
If t[x,y]�2
Goto a2
Lbl a3
1»z
PopUp {"Continue","New","Save","Quit"},z
If z=1
Goto a2
If z=2
Goto a1
If z=4
Goto a9
Lbl a4
matÐlist(t)»mzesve
mzesve&x»mzesve
mzesve&y»mzesve
Text "SAVED!"
Try
Archive mzesve
Else
ClrErr
Lock mzesve
EndTry
Goto a2
Lbl a7
Dialog
Title "ERROR: MEMORY"
Text "You do not have enough"
Text "free memory to run this"
Text "program!"
EndDlog
Goto a10
Lbl a8
Text "CONGRADULATIONS!"
Text "YOU WIN!"
Text "It took you "&string(a)&" moves!"
Text "Final score: "&string(6004-a-b)
Lbl a9
1»x
Dialog
Title "Play again?"
DropDown "Play again?",{"Yes","No"},x
EndDlog
If x=1
Goto a0
Lbl a10
ClrDraw
ClrGraph
ClrHome
ClrIO
ClrTable
DispHome
EndPrgm
Hmmm... There Ya Go!!! Next Chapter!!
-----------------------------------------------------------------------------
8) Closing
-----------------------------------------------------------------------------
There Are Four Basic Rules To BASIC:
1) Always Use 'Secure' To Keep People From Changin' Your Programs.
2) Always Put Disclaimers In You Readme.
3) Always Ask If You Need Help (My E-Mail Is: [email protected])
And Always Provide Help To Those Who Need It.
4) ALWAYS TEST THE PROGRAM! (This Really Makes Me Mad)
Test Your Program And Read Your Manual. Plain And Simple.
Also, Have Fun >}=-> !
If You Want: Uplaod You Games To TiCalc.org So I Can Use 'Em.
E-Mail Me The Name Of Da Game(Not The Game Itself), An' I'll Try It! And
Yes, You May Thank Me In The Readme!
M68000/AC
M68000PM/AD
M68000UM/AD
MC68000/AC
My Address Is:
[Address]
My Phone Number Is:
[Phone Number]
Thank You,
[Name]