Towers of Hanoi!

By Arjan

Paladin (766)

Arjan's picture

09-08-2003, 22:04

I know you're all waiting for Bombaman, but that will still take a while to get finished... So here's another little game! (which I made about 5 years ago)

The easiest way to get this running is to copy&paste the code to a textfile, there's no need to retype all this shit Smile

10 ' Torens of Hanoi
20 SCREEN 1:WIDTH 32:COLOR 15,0,0:KEY OFF
30 CLEAR 200:DEFINT A-Z:C$=CHR$(219)
40 GOSUB 310:GOSUB 530
50 GOSUB 650:GOSUB 420
60 LOCATE 5,2:PRINT C$:LOCATE 5,3:PRINT " "
70 K1$=INKEY$:IF K1$<"1" OR K1$>"3" THEN GOTO 70
80 LOCATE 5,2:PRINT K1$:LOCATE 5,3:PRINT C$
90 K2$=INKEY$:IF K2$=CHR$(27) THEN GOTO 60
100 IF K2$<"1" OR K2$>"3" THEN GOTO 90
110 IF K2$=K1$ THEN GOTO 90
120 LOCATE 5,3:PRINT K2$
130 F=ASC(K1$)-49:D=ASC(K2$)-49:IF A(F)=0 THEN GOTO 60
140 S1$="":AD=6148+(18-A(F))*32+F*8
150 FOR C=0 TO 6:B=VPEEK(AD+C):S1$=S1$+CHR$(B):NEXT C
160 IF A(D)=0 THEN GOTO 200
170 S2$="":AD=6148+(18-A(D))*32+D*8
180 FOR C=0 TO 6:B=VPEEK(AD+C):S2$=S2$+CHR$(B):NEXT C
190 IF S1$>S2$ THEN GOTO 60
200 LOCATE 4+D*8,17-A(D):PRINT S1$
210 LOCATE 4+F*8,18-A(F):PRINT "   ";C$;"   "
220 A(F)=A(F)-1:A(D)=A(D)+1:AB=AB+1
230 LOCATE 6,21:PRINT AB:IF A(2) 
Login or register to post comments

By snout

Ascended (15187)

snout's picture

09-08-2003, 22:11

Is Bombaman coded in BASIC as well? Tongue Tongue Tongue

By Arjan

Paladin (766)

Arjan's picture

10-08-2003, 00:33

you bet! I just applied some JIT compilation to make it all run smoother Wink So, that DOS loader is just a fake Wink But don't worry, Bombaman will still be very playable Smile

By anonymous

incognito ergo sum (116)

anonymous's picture

10-08-2003, 01:15

I suppose that's BASIC z8.0? Tongue