home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Run Magazine ReRun: Strategy Games 1
/
rerun-strategygamesI.d64
/
peg-solitaire
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
2KB
|
54 lines
2 printchr$(147)"would you like instructions (y/n)?
4 [161] a$: [139] a$[179][177] "y" [175] a$[179][177]"n" [167] 4
6 [139] a$[178]"n" [167] 84
8 [153]"instructions on screen or printer (s/p)?
10 get b$: if b$<> "s" and b$<>"p" then 10
12 if b$="s"then d=3
14 if b$="p" then d=4
16 open d,d
18 print#d,"
20 [152]d,"peg solitaire by daniel miller
22 print#d,"
24 [152]d,"run it right: c-64; joystick (optional)
26 print#d,"
28 [152]d,"peg solitaire is the c64 version of the
30 print#d,"board game hi-q. move by jumping over
32 [152]d,"tiles, removing each one that jumped.
34 print#d,"if you can get the last tile to land in
36 [152]d,"the correct square within the assigned
38 print#d,"number of moves, you win!":if d=4 then 48
40 print#d,"
42 [153]"press any key to continue"
44 [161] dd$:[139] dd$[178]"" [167] 44
46 [152]d,"
48 print#d,"to play, use a joystick in port 2 or
50 [152]d,"these keyboard commands:
52 print#d,"
54 [152]d," i - up
56 print#d," m - down
58 [152]d," j - left
60 print#d," k - right
62 [152]d,"
64 print#d,"move the cursor onto a white tile. use
66 [152]d,"the firebutton or the asterisk to enter
68 print#d,"your "chr$(34)"from"chr$(34)" location. then move the
70 [152]d,"cursor to your "[199](34)"to"[199](34)" location and press
72 print#d,"the firebutton or asterisk again.
74 [152]d,"jumps in series with the same tile will
76 print#d,"be counted as one move. diagonal jumps
78 [152]d,"are not allowed. pressing f7 ends the
80 print#d,"game, while f1 shows the solution.
82 [152]d,"":[160]d
84 [153]"press any key to begin the program..."
86 [161] e$:[139] e$[178]"" [167] 86
88 [156]
90 [161] e$:[139] e$[178]"" [167] 90
92 [156]
93 [153]""
94 n$[178]"pegs"
96 [153]"load"[199](34)n$[199](34)","8" ononon"
98 a$[178]"run"
100 a$[178]a$[170][199](13)
102 [151]631,13:[129]b[178]1[164][195](a$):[151]631[170]b,[198]([202](a$,b,1)):[130]:[151]198,10
104 [162]