10 REM COPYRIGHT BY SAKIS KAFFESAKIS 2018
20 CLS:MODE 1:BORDER 14:PEN 1:INK 1,24:INK 0,0:RANDOMIZE TIME   
30 LOCATE 7,5:PRINT "Welcome to..." 
40 SOUND 1,119,20,15:SOUND 1,0,10,15:SOUND 1,119,10,15:SOUND 1,80,40,15 
50 FOR delay=1 TO 50:NEXT delay:LOCATE 18,9:PEN 2:INK 2,18,15:PRINT "HEADS" 
60 FOR delay=1 TO 50:NEXT delay:LOCATE 19,11:PEN 3:INK 3,6:PRINT "OR":FOR delay=1 TO 50:NEXT delay:LOCATE 17,13:PEN 2:PRINT"TAILS!!!":FOR DELAY=1 TO 100:NEXT DELAY
70 PEN 3:LOCATE 12,16:PRINT"(KORONA/GRAMMATA)
80 LOCATE 13,19:PRINT" PRESS ANY KEY":FOR DELAY=1 TO 100:NEXT DELAY:PEN 1
90 LOCATE 8,22:PEN 1:PRINT"by SAKIS KAFFESAKIS":LOCATE 28,22:PRINT CHR$(164):LOCATE 30,22:PRINT"2018":LOCATE 1,24:PRINT"Contact for comments:skafesakis@yahoo.gr" 
100 A$=INKEY$
110 IF A$="" THEN GOTO 100 ELSE GOTO 120
120 CLS:PEN 1:INK 1,24
130 LOCATE 5,18:PRINT"FOR ONE PLAYER GAME PRESS 1"
140 LOCATE 5,20:PRINT"FOR TWO PLAYER GAME PRESS 2"
150 A$=INKEY$
160 IF A$="1" THEN G=1:GOTO 200
170 IF A$="2" THEN g=0:GOTO 200
180 IF A$="" THEN GOTO 150
190 IF a$<>"1" AND  a$<>"2" THEN GOTO 150 
200 CLS:LOCATE 10,10:INPUT"NAME OF PLAYER 1? ",OFI$
210 IF G=1 THEN OLY$="AMSTRAD":GOTO 230
220 LOCATE 10,12:INPUT "NAME OF PLAYER 2? ", OLY$ 
230 X=10000:Y=10000
240 GOTO 260
250 END
260 MODE 1
270 PEN 1:INK 1,16:MOVE 20,127:DRAW 20,20:DRAW 225,20:DRAW 225,127:DRAW 20,127
280 MOVE 620,127:DRAW 620,20:DRAW 415,20:DRAW 415,127:DRAW 620,127
290 PEN 2: INK 2,21:LOCATE 3,19:PRINT "PLAYER 1":LOCATE 3,21: PRINT LEFT$(OFI$,11):LOCATE 5,23:PRINT X
300 LOCATE 28,19:PRINT"PLAYER 2":LOCATE 28,21:PRINT LEFT$(OLY$,11):LOCATE 30,23:PRINT Y:LOCATE 1,1:PEN 1
310 LOCATE 4,5:PRINT "PLAYER 1, DO YOU BET FOR HEADS OR TAILS?"
320 LOCATE 5,9:PRINT "PRESS 1 FOR HEADS OR 2 FOR TAILS"
330 A$=INKEY$
340 IF A$="1" THEN OFI=1
350 IF A$="2" THEN OFI=0
360 IF A$="" THEN GOTO 330
370 IF a$<>"1" AND  a$<>"2" THEN GOTO 330
380 LOCATE 3,5:PRINT"                                                     ":LOCATE 5,8:PRINT"                                         "
390 LOCATE 3,5:INPUT"PLAYER 1 HOW MUCH DO YOU BET? ",BET
400 IF BET>X OR BET>Y THEN LOCATE 30,5:PRINT "          ":GOTO 390
410 IF BET<0 THEN LOCATE 30,5:PRINT "          ":GOTO 390
420 LOCATE 5,9:PRINT"LOADING...":FOR DELAY=1 TO 500:NEXT DELAY
430 IF RND>0.5 THEN KOR=1 ELSE KOR=0
440 IF KOR=OFI THEN X=X+BET:IF KOR=OFI THEN Y=Y-BET  
450 IF KOR<>OFI THEN X=X-BET:IF KOR<>OFI THEN Y=Y+BET
460 IF KOR=1 THEN GOSUB 1000
470 IF KOR=0 THEN GOSUB 1120
480 LOCATE 18,11:IF KOR=1 THEN PRINT "HEADS" ELSE PRINT "TAILS":FOR DELAY=1 TO 300:NEXT DELAY 
490 IF KOR=OFI THEN LOCATE 13,13:PRINT" PLAYER 1 WINS!"
500 IF KOR<>OFI THEN LOCATE 13,13:PRINT" PLAYER 2 WINS!"
510 A$=INKEY$
520 IF A$="" THEN GOTO 510
530 PEN 2:LOCATE 5,23:PRINT "      ":LOCATE 5,23:PRINT X 
540 PEN 2:LOCATE 30,23:PRINT"        ":LOCATE 30,23:PRINT Y
550 A$=INKEY$
560 IF A$="" THEN GOTO 550
570 IF X=0 THEN GOTO 930
580 IF Y=0 THEN GOTO 940
590 IF G=1 THEN GOTO 260
600 CLS:PEN 1:INK 1,16:ORIGIN 0,0:MOVE 20,127:DRAW 20,20:DRAW 225,20:DRAW 225,127:DRAW 20,127
610 MOVE 620,127:DRAW 620,20:DRAW 415,20:DRAW 415,127:DRAW 620,127 
620 PEN 2: INK 2,21:LOCATE 3,19:PRINT "PLAYER 1":LOCATE 3,21: PRINT LEFT$(OFI$,11):LOCATE 5,23:PRINT X
630 LOCATE 28,19:PRINT"PLAYER 2":LOCATE 28,21:PRINT LEFT$(OLY$,11):LOCATE 30,23:PRINT Y:LOCATE 1,1:PEN 1
640 LOCATE 4,5:PRINT "PLAYER 2, DO YOU BET FOR HEADS OR TAILS?"
650 LOCATE 5,9:PRINT "PRESS 1 FOR HEADS OR 2 FOR TAILS"   
660 A$=INKEY$
670 IF A$="1" THEN OLY=1
680 IF A$="2" THEN OLY=0 
690 IF A$="" THEN GOTO 660  
700 IF a$<>"1" AND  a$<>"2" THEN GOTO 660
710 LOCATE 3,5:PRINT"                                                     ":LOCATE 5,8:PRINT"                                         " 
720 LOCATE 3,5:INPUT"PLAYER 2 HOW MUCH DO YOU BET? ",BET 
730 IF BET>Y OR BET>X THEN LOCATE 30,5:PRINT "          ":GOTO 720 
740 IF BET<0 THEN LOCATE 30,5:PRINT "          ":GOTO 720 
750 LOCATE 5,9:PRINT"LOADING...":FOR DELAY=1 TO 500:NEXT DELAY  
760 IF RND>0.5 THEN KOR=1 ELSE KOR=0  
770 IF KOR=OLY THEN Y=Y+BET:IF KOR=OLY THEN X=X-BET
780 IF KOR<>OLY THEN Y=Y-BET:IF KOR<>OLY THEN X=X+BET
790 IF KOR=1 THEN GOSUB 1000
800 IF KOR=0 THEN GOSUB 1120 
810 LOCATE 18,11:IF KOR=1 THEN PRINT "HEADS" ELSE PRINT "TAILS":FOR DELAY=1 TO 300:NEXT DELAY 
820 IF KOR=OLY THEN LOCATE 13,13:PRINT" PLAYER 2 WINS!" 
830 IF KOR<>OLY THEN LOCATE 13,13:PRINT" PLAYER 1 WINS!" 
840 A$=INKEY$  
850 IF A$="" THEN GOTO 840 
860 PEN 2:LOCATE 5,23:PRINT "      ":LOCATE 5,23:PRINT X 
870 PEN 2:LOCATE 30,23:PRINT"        ":LOCATE 30,23:PRINT Y 
880 A$=INKEY$ 
890 IF A$="" THEN GOTO 880
900 IF X=0 THEN GOTO 930  
910 IF Y=0 THEN GOTO 940 
920 GOTO 260
930 CLS:PEN 1:INK 1,6:LOCATE 17,8:PRINT OLY$:PEN 2:INK 2,18,24:LOCATE 17,13:PRINT "WINS!!!":PEN 1:LOCATE 8,21:PRINT"PRESS ANY KEY TO RESTART":GOTO 950
940 CLS:PEN 1:INK 1,6:LOCATE 17,8:PRINT OFI$:PEN 2:INK 2,18,24:LOCATE 17,13:PRINT "WINS!!!":PEN 1:LOCATE 8,21:PRINT"PRESS ANY KEY TO RESTART":GOTO 950 
950 t=1
960 SOUND 1,119,10,14:SOUND 1,106,10,14:SOUND 1,95,10,14:SOUND 1,89,10,14:SOUND 1,80,10,14:SOUND 1,71,10,14:SOUND 1,67,10,14:SOUND 1,63,10,14:SOUND 1,60,20,14
970 A$=INKEY$
980 IF A$="" THEN GOTO 970
990 GOTO 20
1000 ORIGIN 311,278
1010 DEG
1020 MOVE 0,25
1030 FOR w=0 TO 360 STEP 10
1040 DRAW 25*SIN(w),25*COS(w)
1050 NEXT W
1060 PEN 3:INK 3,25
1070 MOVE -23,0
1080 PEN 1:LOCATE 20,8:PRINT CHR$(224):PEN 1 
1085 REM FILL 3
1090 SOUND 1,47,10,15:SOUND 1,40,10,15:SOUND 1,30,10,15
1100 ORIGIN 0,0
1110 RETURN
1120 ORIGIN 311,278 
1130 DEG
1140 MOVE 0,25  
1150 FOR w=0 TO 360 STEP 10 
1160 DRAW 25*SIN(w),25*COS(w) 
1170 NEXT W      
1180 PEN 3:INK 3,25
1190 MOVE -23,0 
1200 PEN 1:LOCATE 20,8:PRINT"1":PEN 1
1205 REM FILL 3
1210 ORIGIN 0,0
1220 SOUND 1,47,10,15:SOUND 1,40,10,15:SOUND 1,30,10,15 
1230 RETURN