10 REM HEART CHASER COPYRIGHT BY SAKIS KAFFESAKIS 2020.
15 GOSUB 3100
16 GOSUB 3600
20 CLS:MODE 1:BORDER 11:PEN 3:INK 3,20:INK 0,0:RANDOMIZE TIME:SCORE=0:DIFF=4:LIVES=2   
30 LOCATE 7,2:PRINT "Welcome to..." 
40 LOCATE 14,8:PEN 2:SPEED INK 40,40:INK 2,19,24:PRINT "HEART CHASER!" 
50 PEN 1:INK 1,15:LOCATE 13,12:PRINT"1. START GAME":LOCATE 13,14:PRINT"2. INSTRUCTIONS":LOCATE 13,16:PRINT"3. REDEFINE KEYS"
60 LOCATE 8,22:PEN 3:PRINT"by SAKIS KAFFESAKIS":LOCATE 28,22:PRINT CHR$(164):LOCATE 30,22:PRINT"2020":LOCATE 1,24:PRINT"Contact for comments:skafesakis@yahoo.gr" 
70 A$=INKEY$
80 IF A$="2" THEN GOSUB 2000:GOTO 20
90 IF A$="3" THEN GOSUB 3000:GOTO 20
100 IF A$="1" THEN GOTO 150
140 GOTO 70
150 REM START GAME
160 REM START GAME
180 MODE 1:PEN 1:INK 1,19:
190 GOSUB 1000:GOSUB 1900
200 MOVE 13,13:DRAW 626,13:DRAW 626,376:DRAW 13,376:DRAW 13,13
250 LOCATE X,Y:PRINT FIG1$
260 PEN 2:INK 2,6:LOCATE XZ1,YZ1:PRINT FIG8$:PEN 1
263 REM FOR DIFFK=1 TO 5:DIFF=2*DIFF
265 REM FOR ST=1 TO 2
270 OBJX=INT(RND*37)+2:OBJY=INT(RND*21)+3
300 WHILE 1
301 LO=0
302 LOCATE 1,1:PEN 2:PRINT "LEVEL";DIFF-3:PEN 3:LOCATE 12,1:PRINT"HEARTS FOUND:";SCORE:LOCATE 32,1:PEN 1:PRINT"LIVES";LIVES;
305 PEN 3:INK 3,24:LOCATE OBJX,OBJY:PRINT OBJ$:PEN 1 
320 a$=INKEY$
330 IF A$=PLA$ AND X>1 AND X<40 THEN OX=X:OY=Y:X=X-1:GOTO 390
340 IF A$=PLD$ AND X>1 AND X<40 THEN OX=X:OY=Y:X=X+1:GOTO 390
350 IF A$=PLK$ AND Y>2 AND Y<25 THEN OX=X:OY=Y:Y=Y+1:GOTO 390
360 IF A$=PLP$ AND Y>2 AND Y<25 THEN OX=X:OY=Y:Y=Y-1:GOTO 390
370 GOTO 400
390 IF X=1 THEN X=2
391 IF X=40 THEN X=39
392 IF Y=2 THEN Y=3
393 IF Y=25 THEN Y=24
399 LOCATE OX,OY:PRINT FIGK$
400 LOCATE X,Y:PRINT FIG1$
430 IF X=OBJX AND Y=OBJY THEN score=SCORE+1:OBJX=INT(RND*37)+2:OBJY=INT(RND*21)+3:GOSUB 3500
450 IF X=XZ1 AND Y=YZ1 THEN GOTO 1500
500 ANT=INT(RND*4)+1:GOSUB 1600
510 IF ANT=1 THEN OXZ1=XZ1:OYZ1=YZ1:XZ1=XZ1-1:GOTO 550
515 IF ANT=2 THEN OXZ1=XZ1:OYZ1=YZ1:XZ1=XZ1+1:GOTO 550
520 IF ANT=3 THEN OXZ1=XZ1:OYZ1=YZ1:YZ1=YZ1-1:GOTO 550
525 IF ANT=4 THEN OXZ1=XZ1:OYZ1=YZ1:YZ1=YZ1+1:GOTO 550 
550 IF XZ1=1 THEN XZ1=2
560 IF XZ1=40 THEN XZ1=39
561 IF YZ1=2 THEN YZ1=3
562 IF YZ1=24 THEN YZ1=23 
580 LOCATE OXZ1,OYZ1:PRINT " "
590 PEN 2:LOCATE XZ1,YZ1:PRINT FIG8$:PEN 1
600 IF X=XZ1 AND Y=YZ1 THEN GOTO 1500
610 IF SCORE=5 THEN SCORE=0:DIFF=DIFF+1:LO=1
620 IF DIFF=11 THEN GOTO 950
625 IF LO=1 THEN CLS:LOCATE 17,13:PRINT "LEVEL";DIFF-3:GOSUB 1496:CLS:GOTO 150
900 WEND
950 MODE 1:LOCATE 17,10:PRINT"YOU WIN!":LOCATE 10,18:PRINT"PRESS SPACE TO RESTART":GOSUB 1495:SCORE=0:DIFF=1
952 R$=INKEY$
954 IF R$=" " THEN GOTO 20
956 GOTO 952
998 END
999 MODE 2:PEN 1:INK 1,19:END
1000 FIG1$=CHR$(224):X=20:Y=20:FIGK$=" "
1005 INK 1,19:INK 2,6:INK 3,24
1010 FIG8$=CHR$(225):XZ1=5:YZ1=5:ekr$=CHR$(252)
1012 IF DIFF<4 THEN XZ1=5:YZ1=5
1013 IF DIFF>4 AND DIFF<7 THEN XZ1=30:YZ1=10
1014 IF DIFF>7 AND DIFF<10 THEN XZ1=20:YZ1=10
1015 IF DIFF=10 THEN XZ1=20:YZ1=18
1020  REM !!!!!!!!!!!!!SETTING DIFFICULTY!!!!!!!!!!!!!!!!!
1030 OBJ$=CHR$(228)
1490 RETURN
1495 W1$=INKEY$:W2$=INKEY$:W3$=INKEY$:W4$=INKEY$:W5$=INKEY$:W6$=INKEY$:W1$=INKEY$:W2$=INKEY$:W3$=INKEY$:W4$=INKEY$:W5$=INKEY$:W6$=INKEY$:RETURN
1496 R$=INKEY$
1498 IF R$=" " THEN RETURN
1499 GOTO 1496
1500 SOUND 1,800,20,15,,,15:LOCATE XZ1,YZ1:PEN 2:PRINT EKR$:PEN 1:LIVES=LIVES-1:IF LIVES=0 THEN GOTO 1700
1548 GOSUB 1495
1550 D$=INKEY$
1560 IF D$="" THEN GOTO 1550 
1570 MODE 1:LOCATE 17,20:PRINT"LIFE LOST":GOSUB 1495
1580 D$=INKEY$
1590 IF D$=" " THEN GOTO 150
1599 GOTO 1580
1600 REM
1610 ANT1=INT(RND*10)+1
1615 IF ANT1>DIFF THEN RETURN
1620 IF X=XZ1 AND Y<YZ1 THEN ANT=3:RETURN
1621 IF X=XZ1 AND Y>YZ1 THEN ANT=4:RETURN
1622 IF Y=YZ1 AND X<XZ1 THEN ANT=1:RETURN
1623 IF Y=YZ1 AND X>XZ1 THEN ANT=2:RETURN 
1630 KAT=INT(RND*2)+1
1635 IF KAT=1 THEN GOTO 1650
1637 IF KAT=2 THEN GOTO 1654
1650 IF X<XZ1 THEN ANT=1
1652 IF X>XZ1 THEN ANT=2
1653 GOTO 1669
1654 IF Y<YZ1 THEN ANT=3
1656 IF Y>YZ1 THEN ANT=4
1669 RETURN
1690 RETURN
1700 GOSUB 1496:MODE 1:LOCATE 17,20:PRINT"GAME OVER":LOCATE 10,18:PRINT"PRESS SPACE TO RESTART":GOSUB 1495
1710 D$=INKEY$
1720 IF D$=" " THEN GOTO 20
1730 GOTO 1710
1900 IF DIFF<5 THEN XZ1=15:YZ1=8
1920 IF DIFF>6 AND DIFF<9 THEN XZ1=30:YZ1=10
1930 IF DIFF>6 AND DIFF<10 THEN XZ1=20:YZ1=10 
1940 IF DIFF>8 THEN XZ1=20:YZ1=15
1999 RETURN
2000 MODE 2:PEN 1:INK 1,19:LOCATE 1,3:PRINT"In this game, you have to collect the hearts, and avoid the angry enemy.":LOCATE 1,6:PRINT"You have to collect five hearts for each level."
2010 LOCATE 1,9:PRINT"There are 7 levels, and the intelligence of the enemy increases in each level.":LOCATE 1,12:PRINT"You have only 2 lives!"
2020 LOCATE 36,22:PRINT"HAVE FUN!"
2030 GOSUB 1495
2040 T$=INKEY$
2050 IF T$<>"" THEN GOTO 20
2060 GOTO 2040
2999 RETURN
3000 PEN 1:INK 1,19:MODE 2:LOCATE 4,6:PRINT"1. JOYSTICK KEYS":LOCATE 4,10:PRINT"2. a w s d KEYS":LOCATE 4,14:PRINT"3. q a o p KEYS"
3005 LOCATE 3,18:PRINT"PLS DO NOT USE CAPITAL KEYS"
3010 K$=INKEY$
3020 IF K$="1" THEN PLK$="\n":PLP$="":PLA$="":PLD$="\t":GOTO 3060
3030 IF K$="2" THEN PLK$="s":PLP$="w":PLA$="a":PLD$="d":GOTO 3060
3040 IF K$="3" THEN PLK$="a":PLP$="q":PLA$="o":PLD$="p":GOTO 3060
3050 GOTO 3010
3060 LOCATE 16,22:PRINT "SELECTION OK"
3065 L$=INKEY$ 
3070 IF L$="" THEN GOTO 3065
3080 RETURN
3100 PLK$="\n":PLP$="":PLA$="":PLD$="\t":RETURN
3500 REM
3510 SOUND 1,90,10,15:SOUND 1,85,7,15:SOUND 1,80,7,15:SOUND 1,75,7,15:
3599 RETURN
3600 FOR SOU=1 TO 2:SOUND 1,80,10,15:SOUND 1,67,10,15:SOUND 1,60,15,15:SOUND 1,0,5:NEXT SOU
3649 RETURN