Android Nim is a version of the mathematical strategy game Nim programmed by Leo Christopherson for the TRS-80 computer in 1978. I programmed this version for the QB64 environment during the Covid-19 pandemic. Android Nim features real-time animation of the androids on a TRS-80.
The object of the game is to remove the last android from three rows of androids. The game's premise is simple, but its animation is impressive given the limitations of the TRS-80's display. Throughout the game androids are animated to face different directions, as if bored or engaging in conversation with one another.
The game starts with three rows of androids which contain 7, 5, and 3 androids respectively. An animated android asks the player if they would like to go first. The player chooses a row and types in how many droids to remove. An animated droid at the head of the row then nods its head and raises a gun and the other androids turn to look at the selected row. The specified number of androids are then zapped with a laser beam. It is then the computer's turn—with similar effect—and play continues until the last android is removed.
If the human wins, the computer is an amusingly poor sport and displays astonishment; if it wins, the computer displays a huge "I WIN!".
With this QB64 version I wanted to revive the screen and graphics of the TRS-80 computers.
Only the sound was not programmed.
Hopefully you like this version of Android Nim.
Soon there will be a new version of Android Nim, with sound and use of the mouse.
Below is the code, more than 1300 lines long. I hope the codepage and ASCII characters are copied correctly. If not, the source is also attached.
More of the original game at http://www.trs-80.org/android-nim
The object of the game is to remove the last android from three rows of androids. The game's premise is simple, but its animation is impressive given the limitations of the TRS-80's display. Throughout the game androids are animated to face different directions, as if bored or engaging in conversation with one another.
The game starts with three rows of androids which contain 7, 5, and 3 androids respectively. An animated android asks the player if they would like to go first. The player chooses a row and types in how many droids to remove. An animated droid at the head of the row then nods its head and raises a gun and the other androids turn to look at the selected row. The specified number of androids are then zapped with a laser beam. It is then the computer's turn—with similar effect—and play continues until the last android is removed.
If the human wins, the computer is an amusingly poor sport and displays astonishment; if it wins, the computer displays a huge "I WIN!".
With this QB64 version I wanted to revive the screen and graphics of the TRS-80 computers.
Only the sound was not programmed.
Hopefully you like this version of Android Nim.
Soon there will be a new version of Android Nim, with sound and use of the mouse.
Below is the code, more than 1300 lines long. I hope the codepage and ASCII characters are copied correctly. If not, the source is also attached.
More of the original game at http://www.trs-80.org/android-nim
Code: (Select All)
$RESIZE:SMOOTH
DEFINT A-Z
DIM SHARED LucGev$, Belgium$, Version$, AndroidNim$, CURRENT_WORD$
'DIM SHARED TRUE, FALSE AS INTEGER
DIM SHARED AN_ANTENNE_00$, AN_ANTENNE_01$, AN_ANTENNE_L1$, AN_ANTENNE_L2$, AN_ANTENNE_R1$, AN_ANTENNE_R2$
DIM SHARED AN_HOOFD_01$, AN_HOOFD_02$, AN_HOOFD_03$, AN_HOOFD_04$, AN_HOOFD_05$, AN_HOOFD_06$
DIM SHARED AN_HOOFD_07$, AN_HOOFD_08$, AN_HOOFD_09$, AN_HOOFD_10$, AN_HOOFD_11$, AN_HOOFD_12$
DIM SHARED AN_HOOFD_13$, AN_HOOFD_14$, AN_HOOFD_15$, AN_HOOFD_16$, AN_HOOFD_17$, AN_HOOFD_18$
DIM SHARED AN_BODY_01$, AN_BODY_02$, AN_BODY_03$, AN_BODY_04$, AN_BODY_05$, AN_BODY_06$
DIM SHARED AN_BODY_07$, AN_BODY_08$, AN_BODY_09$, AN_BODY_10$, AN_BODY_11$, AN_BODY_12$
DIM SHARED AN_BODY_13$, AN_BODY_14$, AN_BODY_15$, AN_BODY_16$, AN_BODY_17$, AN_BODY_18$
DIM SHARED AN_BODY_19$, AN_BODY_20$, AN_BODY_21$, AN_BODY_22$, AN_BODY_23$, AN_BODY_24$
DIM SHARED AN_BODY_25$, AN_BODY_26$, AN_BODY_27$, AN_BODY_28$, AN_BODY_29$, AN_BODY_30$
DIM SHARED AN_BODY_31$, AN_BODY_32$, AN_BODY_33$, AN_BODY_34$
DIM SHARED AN_BENEN_01$, AN_BENEN_02$
DIM SHARED AIR(3) AS INTEGER 'Aantal in rij in getal
DIM SHARED BIR(3) AS STRING 'Aantal in rij binaire voorstelling
DIM SHARED KOL(3) AS STRING * 1 'E of O in de kolom.
DIM SHARED ALOC_KOL(3, 7) AS INTEGER 'locatie van de androids
DIM SHARED ALOC_RIJ(3) AS INTEGER 'de 3 rijen waar de androids starten
DIM SHARED SR, NR 'SelectROW, NR of Androids to shoot
DIM SHARED Wie 'Wie is aan de beurt; indien negatief dan is dit de winnaar. 1=MENS, 2=PC
DIM SHARED I_ColorScheme$(0 TO 10)
DIM SHARED H_ColorScheme AS INTEGER
DIM SHARED CHOSEN_WORDS(80)
DIM SHARED WORD$(80)
TYPE InitType
FullScreen AS INTEGER ' True of False
ColorScheme AS STRING ' TRS-80 Green|2|0|7
ForeColor AS INTEGER ' 2
BackColor AS INTEGER ' 0
AltForeColor AS INTEGER ' 7
AltShooter AS INTEGER '0
END TYPE
DIM SHARED INIT AS InitType
'Constants
CONST TRUE = -1
CONST FALSE = NOT TRUE
WORD_DATA:
DATA "DISGUSTING","STUPID","RIDICULOUS","IDIOTIC","GROTESQUE","ABSURD","NONSENSICAL","FARCICIAL","PREPOSTEROUS","SILLY","SENSELESS","IRRATIONAL","FANTASTIC"
DATA "ODD","RUDE","BRUTISH","BARBARIC","PLEBEIAN","UNCIVIL","DISCOURTEOUS","VULGAR","COARSE","GROSS","MONSTROUS","HORRID","SHOCKING","CHEAP"
DATA "INCONSIQUENTIAL","BULBOUS","DASTERDLY","MORONIC","IMMATURE","IMPOSSIBLE","ILLOGICAL","ELEPHANTINE","IRRESPONSIBLE","HUMANISTIC","DUMB-DUMB","RECKLESS"
DATA "NEGLIGENT","UNFEASIBLE","UNBEARABLE","INTOLERABLE","INSUFFERABLE","AWKWARD","OFFENSIVE","NAUGHTY","IMPROPER","UNCOUTH","ILL-MANNERED","LOUTISH","BOORISH"
DATA "BRASH","OUTLANDISH","TASTELESS","UNBEARABLE","INSUPPORTABLE","UNENDURABLE","UNSPEAKABLE","NEGLECTFUL","CARELESS","INATTENTIVE","SLIPSHOD","LAX","FORGETFUL"
DATA "UNINTELLIGENT","DIM-WITTED","BRAINLESS","OBTUSE","FOOLISH","IMPRUDENT","INJUDICIOUS","LAUGHABLE","TRADGIC","DISASTROUS","CATASTROPHIC","HEARTBREAKING","DREADFUL","APPALLING","WRETCHED"
INIT_CONFIG
INIT_ANDROIDS
STARTSCHERM
WIDTH 80, 50
_SCREENMOVE _MIDDLE
_LIMIT 1000
Plaats_Alle_Androids
VOLGENDE_ZET:
DO
COLOR INIT.ForeColor, INIT.BackColor: LOCATE 49, 60
IF Wie = 1 THEN
PRINT " * It's your turn *";
'clear input buffer
_KEYCLEAR
VRAAG_RIJ_KOL_2
ELSE
PRINT " * It's my turn *";
ANIMATE_SHOOTERS
ANIMATE_ANDROIDS
Bereken_Zet
END IF
IF SpelGedaan = 0 THEN
Wie = Wie * -1 'speler Wie heeft gewonnen
ELSEIF SpelGedaan <> 15 AND Wie <> -255 THEN 'bij 15 opgegeven, spel is herstart
Wie = Wie XOR 3
END IF
LOOP UNTIL Wie < 0
IF Wie = -1 THEN 'mens gewonnen
HUMAN_WIN
ELSEIF Wie = -2 THEN 'android nim gewonnen
I_WIN
END IF
IF Wie = -255 THEN 'spel gedaan
WIS_VELD
LOCATE 25, 30: PRINT "Thank you for playing Android Nim."
DO
x$ = INKEY$
ANIMATE_SHOOTERS
LOOP UNTIL x$ <> ""
WIDTH 80, 25: COLOR 7, 0: CLS: SYSTEM 0
ELSE 'opnieuw spelen
WIS_VELD
INIT_CONFIG
INIT_ANDROIDS
Plaats_Alle_Androids
GOTO VOLGENDE_ZET
END IF
'Convert_To_BIN
'WIDTH 80, 25: COLOR 7, 0: CLS: END
SYSTEM 1
SUB STARTSCHERM
'Init name and the rest
LucGev$ = "Luc Gevaert": Belgium$ = "Belgium": Version$ = "1.02": AndroidNim$ = "Android Nim"
x$ = LucGev$ + Belgium$ + AndroidNim$: som = 0 'som moet 2780 zijn om correct te zijn.
'check for zappers in the code.
FOR A = 1 TO LEN(x$)
som = som + ASC(MID$(x$, A, 1))
NEXT
IF som <> 2780 THEN
'please, no!
PRINT: PRINT "Please do not change the code. Thanks in advance.": PRINT "Press ANY key..."
x$ = INPUT$(1): SYSTEM 1
END IF
'screen in 80x50 fullscreen.
_TITLE AndroidNim$
SCREEN 0, 1, 0, 0: IF INIT.FullScreen = 1 THEN _FULLSCREEN _SQUAREPIXELS , _SMOOTH ELSE _FULLSCREEN _OFF
_BLINK OFF
_SCREENMOVE _MIDDLE
STARTSCHERM2:
COLOR INIT.ForeColor, INIT.BackColor: CLS
'teken startscherm
PRINT "ÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÛ";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û Û Û";
PRINT "Û Û Û Û";
PRINT "Û ÛÛÛÛÛÛ ÜÛÛÛÛÛÜ ÜÛÛÛÛÛÜ ÛÛÛÛÛÛÜ ÛÛÛÛÛÛÜ ÜÛÛÛÛÛÜ ÞÛÛÝ ÛÛÛÛÛÛÜ Û";
PRINT "Û ÛÛ ÛÛ ÛÛ ÛÛÜÜÜÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛÛ ÛÛÛ ÛÛßßßÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛÛÛÛß ÛÛ ßÛÛ ßÛÛÛÛÛß ÞÛÛÝ ÛÛÛÛÛÛß Û";
PRINT "Û ÛÛÛÛÛÛÛÛ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ ÜÛÛÛÛÛÜ ÞÛÛÝ ÜÛÛÛÛÛÛÜ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛÛ ÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û Û Û ÛÛ ÛÛ ÞÛÛÝ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û Û Û Û";
PRINT "Û ÛÛÛÛ ÛÛÛÛ Û";
PRINT "Û ";: COLOR INIT.AltForeColor: PRINT AndroidNim$; " - Version "; Version$; " - By "; LucGev$; SPACE$(10);: COLOR INIT.ForeColor: PRINT "Û";
PRINT "Û ";: COLOR INIT.AltForeColor: PRINT " Original by Leo Christopherson, 1979-1986";: COLOR INIT.ForeColor: PRINT " Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
LOCATE 25, 1: PRINT "Press ";: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ÄÄÙ ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " to start, ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " H ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " for Help, ";: COLOR INIT.BackColor, INIT.ForeColor
PRINT " I ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " for Info, ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " S ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " for Setup, ";: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ESC ";
COLOR INIT.ForeColor, INIT.BackColor: PRINT " to exit";:
WHILE INKEY$ <> "": WEND 'Clear keyboard buffer
x$ = ""
STARTSCHERM1:
x$ = LCASE$(INKEY$)
IF x$ = CHR$(27) THEN 'end program
SCREEN 0, 1, 0, 0: _FULLSCREEN _OFF: COLOR 7, 0: CLS
SYSTEM 0
END IF
IF x$ = "s" THEN
INIT_SETUP
GOTO STARTSCHERM2
END IF
IF x$ = "i" THEN
START_INFO
GOTO STARTSCHERM2
END IF
IF x$ = "h" THEN
START_HELP
GOTO STARTSCHERM2
END IF
IF x$ <> CHR$(13) THEN GOTO STARTSCHERM1
END SUB
SUB INIT_CONFIG
'default color schema's
I_ColorScheme$(1) = "TRS-80 Green|02|00|07"
I_ColorScheme$(2) = "TRS-80 White|07|00|03"
I_ColorScheme$(3) = "TRS-80 Cyan|03|00|05"
I_ColorScheme$(4) = "TRS-80 Amber|06|00|07"
I_ColorScheme$(5) = "Reverse 1|00|02|14"
I_ColorScheme$(6) = "Reverse 2|00|07|14"
I_ColorScheme$(7) = "Yellow|14|08|10"
I_ColorScheme$(8) = "QB45|07|01|03"
I_ColorScheme$(9) = "NC5|03|01|14"
I_ColorScheme$(10) = "High|15|00|14"
Wie = 0
' Lees diskfile met setup gegevens
'maak eerst default waarden aan
INIT.FullScreen = FALSE
INIT.ColorScheme = I_ColorScheme$(1)
INIT.ForeColor = 2
INIT.BackColor = 0
INIT.AltForeColor = 7
INIT.AltShooter = 0
I_ColorScheme$(0) = "TRS-80 Green"
H_ColorScheme = 0 'huidig colorschema
FN$ = "AndroidNim.CFG"
ff = FREEFILE
IF _FILEEXISTS(FN$) THEN
OPEN FN$ FOR INPUT AS ff
IF NOT EOF(ff) THEN INPUT #ff, INIT.FullScreen
IF NOT EOF(ff) THEN INPUT #ff, INIT.ColorScheme
IF NOT EOF(ff) THEN INPUT #ff, INIT.ForeColor
IF NOT EOF(ff) THEN INPUT #ff, INIT.BackColor
IF NOT EOF(ff) THEN INPUT #ff, INIT.AltForeColor
IF NOT EOF(ff) THEN INPUT #ff, INIT.AltShooter
ELSE
OPEN FN$ FOR OUTPUT AS ff
PRINT #ff, INIT.FullScreen
PRINT #ff, INIT.ColorScheme
PRINT #ff, INIT.ForeColor
PRINT #ff, INIT.BackColor
PRINT #ff, INIT.AltForeColor
PRINT #ff, INIT.AltShooter
END IF
CLOSE ff
RESTORE WORD_DATA
FOR X = 1 TO 80
READ WORD$(X)
CHOSEN_WORDS(X) = 0
NEXT X
END SUB
SUB INIT_ANDROIDS
'AIR = Aantal Androids In Rij
AIR(1) = 7: AIR(2) = 5: AIR(3) = 3
'Antennes = 2 hoog
'Hoofd = 4 hoog
'Body = 5 hoog
'Benen = 4 hoog
AN_ANTENNE_00$ = " "
AN_ANTENNE_01$ = " ÝÞ "
AN_ANTENNE_L1$ = " Þ Ý "
AN_ANTENNE_L2$ = " Ý "
AN_ANTENNE_R1$ = " Þ Ý "
AN_ANTENNE_R2$ = " Þ "
AN_HOOFD_01$ = " ÞÛÛÝ "
AN_HOOFD_02$ = " ÛÞÝÛ "
AN_HOOFD_03$ = " ÛÝÞÛ "
AN_HOOFD_04$ = " ÛÛ "
AN_HOOFD_05$ = " ÝÞ "
AN_HOOFD_06$ = " ÞÞÝÝ "
AN_HOOFD_07$ = " ÛÝÞÛ "
AN_HOOFD_08$ = " ÛÛÛÛ "
AN_HOOFD_09$ = " ÞÝÞÝ "
AN_HOOFD_10$ = " ÝÛÞÛ "
AN_HOOFD_11$ = " Û ÛÛ "
AN_HOOFD_12$ = " ÝÛÛÛ "
AN_HOOFD_13$ = "ÞÛÛÛÛ "
AN_HOOFD_14$ = " ÛÝÛÞ "
AN_HOOFD_15$ = " ÛÛ Û "
AN_HOOFD_16$ = " ÛÛÛÞ "
AN_HOOFD_17$ = " ÛÛÛÛÝ"
AN_HOOFD_18$ = " ÛÛÛÛ "
AN_BODY_01$ = " ÛÛÛÛ "
AN_BODY_02$ = "ÞÝÛÛÞÝ"
AN_BODY_03$ = "Û ÛÛ Û"
AN_BODY_04$ = "ÞÝÛÛÞÝ"
AN_BODY_05$ = " ÛÝÞÛ "
AN_BODY_06$ = "ÞÝÛÞÞÝ"
AN_BODY_07$ = "Û ÛÛÞÝ"
AN_BODY_08$ = " ÛÝÞ Û"
AN_BODY_09$ = "ÞÝÛÛ Û"
AN_BODY_10$ = "Û ÝÞÛ "
AN_BODY_11$ = "Û ÝÞ Û"
AN_BODY_12$ = " ÛÛÛÛ "
AN_BODY_13$ = "ÞÝÛÛÛ "
AN_BODY_14$ = "Û ÛÛÛ "
AN_BODY_15$ = " ÛÝÞ Û"
AN_BODY_16$ = " ÛÛÛÞÝ"
AN_BODY_17$ = " ÛÛÛ Û"
AN_BODY_18$ = "Û ÝÞÛ "
AN_BODY_19$ = "Û ÝÞ Û"
AN_BODY_20$ = "ÞÝÛÛÛ "
AN_BODY_21$ = "Û ÛÛÛ "
AN_BODY_22$ = "Û ÛÛÛÛÛÛ"
AN_BODY_23$ = "ÞÝÛÛ "
AN_BODY_24$ = " ÛÝÞ "
AN_BODY_25$ = "ÞÝÛÛÞÝÛ,-="
AN_BODY_26$ = "Û ÛÛ ÛÝ "
AN_BODY_27$ = "ÞÝÛÛ "
AN_BODY_28$ = " ÛÝÞ "
AN_BODY_29$ = " ÛÛÛÛÛÛÛ/-="
AN_BODY_30$ = "ÞÝÛÛ "
AN_BODY_31$ = "Û ÛÛ "
AN_BODY_32$ = "ÞÝÛÞÛ "
AN_BODY_33$ = "ÞÝÛÞÞÝÛ,-= "
AN_BODY_34$ = "ÞÝÛÞ "
AN_BENEN_01$ = " ÝÞ "
AN_BENEN_02$ = " ÛÝÞÛ "
'bepaal de rij en kolommen van de androids
'elke android is 15 hoog + 2 spaties (=17), Startlocatie eerste android op rij 5
FOR a = 1 TO 3
ALOC_RIJ(a) = 17 * (a - 1) + 2
NEXT
'elke android is 6 breed + 4 spaties (=10), startlocatie rij 1 is 25
FOR a = 1 TO 7
ALOC_KOL(1, a) = 9 * (a - 1) + 17 '9 breed ipv 10
NEXT
FOR a = 1 TO 7
IF a < 6 THEN ALOC_KOL(2, a) = 10 * (a - 1) + 25 ELSE ALOC_KOL(2, a) = 0
NEXT
FOR a = 1 TO 7
IF a < 4 THEN ALOC_KOL(3, a) = 10 * (a - 1) + 33 ELSE ALOC_KOL(3, a) = 0
NEXT
'ALOC_KOL(rij,0) = locatie van de Chef.
ALOC_KOL(1, 0) = 5: ALOC_KOL(2, 0) = ALOC_KOL(1, 0) + 3: ALOC_KOL(3, 0) = ALOC_KOL(1, 0) + 1
'zet de Androids voor de eerste maal op 't scherm.
'Plaats_Alle_Androids
END SUB
SUB Convert_To_BIN
FOR A = 1 TO 3
number = AIR(A)
Binary$ = ""
DO
remain = ABS(number MOD 2) ' remainder is used to create binary number
number = number \ 2 ' move up one exponent of 2 with integer division
Bin$ = LTRIM$(STR$(remain)) ' make remainder a string number
Binary$ = Bin$ + Binary$ ' add remainder to binary number
LOOP UNTIL number = 0
BIR(A) = RIGHT$("00" + Binary$, 3)
NEXT
FOR k = 1 TO 3
number = 0
FOR r = 1 TO 3
number = number + VAL(MID$(BIR(r), k, 1))
NEXT
IF number AND NOT -2 THEN KOL(k) = "O" ELSE KOL(k) = "E"
NEXT
END SUB
FUNCTION SpelGedaan
SpelGedaan = AIR(1) + AIR(2) + AIR(3)
END FUNCTION
SUB Bereken_Zet
sw = 0
FOR r = 1 TO 3 '3 rijen androids
NR = 0: SR = 0 'nr of androids to shoot, select row
O_AIR = AIR(r) 'Bewaar vorige # androids in rij
FOR A = O_AIR - 1 TO 0 STEP -1
AIR(r) = A: sw = 1
Convert_To_BIN
IF KOL(1) + KOL(2) + KOL(3) = "EEE" THEN 'een gunstige situatie
NR = O_AIR - A: SR = r: AIR(r) = O_AIR - NR
'LOCATE 42, 60: PRINT "EEE => NR="; NR; " SR="; SR;
'_DELAY 4
EXIT FOR
END IF
NEXT
IF NR + SR = 0 THEN
AIR(r) = O_AIR
ELSE
EXIT FOR
END IF
NEXT
'''''IF NR + SR <> 0 THEN EXIT SUB
IF NR + SR <> 0 THEN GOTO BEREKEN_ZET_1
'niets gevonden. ofwel zijn er geen androids meer en is er een winnaar ofwel moet android nim zelf beslissen
'android nim beslist zelf. haal 1 weg van de beschikbare rij
IF SpelGedaan = 0 THEN EXIT SUB
RANDOMIZE TIMER
DO
SR = INT(RND * 3) + 1
LOOP UNTIL AIR(SR) <> 0
'SR = willekeurige rij waar androids staan
NR = INT(RND * AIR(SR)) + 1 'nr = willekeurig aantal androids
'LOCATE 41, 60: PRINT "GEEN EEE => NR="; NR; " SR="; SR;
'_DELAY 4
BEREKEN_ZET_1:
LOCATE ALOC_RIJ(SR) + 3, 1: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 4, 1: PRINT STR$(SR); " ";
LOCATE ALOC_RIJ(SR) + 5, 1: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor
_DELAY 1
LOCATE ALOC_RIJ(SR) + 7, 1: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 8, 1: PRINT STR$(NR); " ";
LOCATE ALOC_RIJ(SR) + 9, 1: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor
_DELAY 1
WIS_ANDROIDS
'IF sw = 0 THEN AIR(SR) = NR
Convert_To_BIN
END SUB
SUB VRAAG_RIJ_KOL_2
VRAAG_R_K_2:
'Vraag rij
DO
x$ = INKEY$
ANIMATE_SHOOTERS
ANIMATE_ANDROIDS
LOOP UNTIL x$ <> ""
IF x$ = "r" OR x$ = "R" THEN
WIS_VELD
INIT_CONFIG
INIT_ANDROIDS
Plaats_Alle_Androids
EXIT SUB
END IF
IF x$ = CHR$(27) THEN Wie = -255: EXIT SUB
SR = VAL(x$)
IF SR < 1 OR SR > 3 THEN GOTO VRAAG_R_K_2
IF AIR(SR) = 0 THEN
Knik_Nee
GOTO VRAAG_R_K_2
END IF
LOCATE ALOC_RIJ(SR) + 3, 1: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 4, 1: PRINT STR$(SR); " ";
LOCATE ALOC_RIJ(SR) + 5, 1: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor
'Vraag aantal
VRAAG_R_K_3:
DO
x$ = INKEY$
ANIMATE_SHOOTERS
ANIMATE_ANDROIDS
LOOP UNTIL x$ <> ""
IF x$ = "r" OR x$ = "R" THEN
WIS_VELD
INIT_CONFIG
INIT_ANDROIDS
Plaats_Alle_Androids 'tijdelijk
EXIT SUB
END IF
IF x$ = CHR$(27) THEN Wie = -255: EXIT SUB
IF x$ = " " THEN
LOCATE ALOC_RIJ(SR) + 3, 1: COLOR INIT.ForeColor, INIT.BackColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 4, 1: PRINT " ";
LOCATE ALOC_RIJ(SR) + 5, 1: PRINT " ";
GOTO VRAAG_R_K_2
END IF
NR = VAL(x$)
IF NR < 1 OR NR > AIR(SR) THEN
Knik_Nee
GOTO VRAAG_R_K_2
END IF
LOCATE ALOC_RIJ(SR) + 7, 1: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 8, 1: PRINT STR$(NR); " ";
LOCATE ALOC_RIJ(SR) + 9, 1: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor
WIS_ANDROIDS
'AIR(SR) = AIR(SR) - NR
Convert_To_BIN
END SUB
SUB Plaats_Alle_Androids
COLOR INIT.ForeColor, INIT.BackColor
CLS 'wis scherm
'Plaats de 3 chefs
IF INIT.AltShooter = 1 THEN COLOR INIT.AltForeColor, INIT.BackColor
FOR a = 1 TO 3
k = ALOC_KOL(a, 0)
LOCATE ALOC_RIJ(a), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(a) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(a) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(a) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(a) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(a) + 5, k: PRINT AN_HOOFD_04$;
LOCATE ALOC_RIJ(a) + 6, k: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(a) + 7, k: PRINT AN_BODY_06$;
LOCATE ALOC_RIJ(a) + 8, k: PRINT AN_BODY_03$;
LOCATE ALOC_RIJ(a) + 9, k: PRINT AN_BODY_04$;
LOCATE ALOC_RIJ(a) + 10, k: PRINT AN_BODY_05$;
LOCATE ALOC_RIJ(a) + 11, k: PRINT AN_BENEN_01$;
LOCATE ALOC_RIJ(a) + 12, k: PRINT AN_BENEN_01$;
LOCATE ALOC_RIJ(a) + 13, k: PRINT AN_BENEN_02$;
NEXT
COLOR INIT.ForeColor, INIT.BackColor
Wie = 0
LOCATE 25, 30: PRINT "First move by You (1) or Me (2) ?"
DO
x$ = INKEY$
ANIMATE_SHOOTERS
LOOP UNTIL x$ = "1" OR x$ = "2"
Wie = VAL(x$): LOCATE 25, 30: PRINT SPACE$(33);: LOCATE 25, 30
IF Wie = 1 THEN
PRINT "Very well, you may start !";
ELSE
PRINT "OK,I'll start !";
END IF
_DELAY 1.6
LOCATE 25, 30: PRINT SPACE$(33);
COLOR INIT.ForeColor, INIT.BackColor
FOR r = 1 TO 3
FOR k = 1 TO AIR(r)
l = ALOC_KOL(r, k)
LOCATE ALOC_RIJ(r), l: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 1, l: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, l: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, l: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 4, l: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(r) + 5, l: PRINT AN_HOOFD_04$;
LOCATE ALOC_RIJ(r) + 6, l: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(r) + 7, l: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 8, l: PRINT AN_BODY_03$;
LOCATE ALOC_RIJ(r) + 9, l: PRINT AN_BODY_04$;
LOCATE ALOC_RIJ(r) + 10, l: PRINT AN_BODY_05$;
LOCATE ALOC_RIJ(r) + 11, l: PRINT AN_BENEN_01$;
LOCATE ALOC_RIJ(r) + 12, l: PRINT AN_BENEN_01$;
LOCATE ALOC_RIJ(r) + 13, l: PRINT AN_BENEN_02$;
NEXT
NEXT
END SUB
SUB INIT_SETUP
'Bewaar oorspronkelijk moest ESC gedrukt worden
O_FS = INIT.FullScreen
O_CS$ = INIT.ColorScheme
O_FC = INIT.ForeColor
O_BC = INIT.BackColor
O_AC = INIT.AltForeColor
O_AS = INIT.AltShooter
I_ColorScheme$(0) = o_cf$
K = 45: rij = 7: rijp = rij
H_ColorScheme = 0
INIT_SETUP1:
IF INIT.FullScreen = 1 THEN _FULLSCREEN ELSE _FULLSCREEN _OFF 'Gaan we in Window of Full Screen?
COLOR INIT.ForeColor, INIT.BackColor: CLS
PRINT "ÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÛ";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û Û ";: COLOR INIT.AltForeColor: PRINT AndroidNim$; " Setup";: PRINT SPACE$(38);: COLOR INIT.ForeColor: PRINT "Û";
PRINT "Û Û Û ";: COLOR INIT.AltForeColor: PRINT STRING$(48, "Ä");: COLOR INIT.ForeColor: PRINT " Û";
PRINT "Û ÛÛÛÛÛÛ Û";
PRINT "Û ÛÛ ÛÛ ÛÛ Fullscreen? Yes No Û";
PRINT "Û ÛÛÛ ÛÛÛ Û";
PRINT "Û ÛÛÛÛ Color Scheme: X Û";
PRINT "Û ÛÛÛÛÛÛÛÛ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ Shooters: Normal Second Color Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ ";: COLOR INIT.AltForeColor: PRINT STRING$(48, "Ä");: COLOR INIT.ForeColor: PRINT " Û";
PRINT "Û ÛÛÛ ÛÛÛ Û";
PRINT "Û Û Û Û";
PRINT "Û Û Û Û";
PRINT "Û ÛÛÛÛ ÛÛÛÛ Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
LOCATE 24, 1: PRINT " Use ";: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " and ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " to select - ";: COLOR INIT.BackColor, INIT.ForeColor
PRINT " SPACE ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " to change setting";
LOCATE 25, 1: PRINT " ";: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ÄÄÙ ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " Return and use changes - ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " S ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " Save changes to disk - ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " Esc ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " Aborts";
LOCATE rijp, K - 20: COLOR INIT.AltForeColor, INIT.BackColor: PRINT "ÍÍ";
'*** Vul scherm aan met de waarden
IF INIT.FullScreen = 1 THEN
LOCATE rij, K: COLOR INIT.BackColor, INIT.ForeColor: PRINT " Yes ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " No ";
ELSE
LOCATE rij, K: COLOR INIT.ForeColor, INIT.BackColor: PRINT " Yes ";: COLOR INIT.BackColor, INIT.ForeColor: PRINT " No ";
END IF
a = INSTR(INIT.ColorScheme, "|")
IF a > 1 AND LEN(INIT.ColorScheme) > 7 THEN
x$ = LEFT$(INIT.ColorScheme, a - 1): IF LEN(x$) > 33 THEN x$ = LEFT$(x$, 33)
LOCATE rij + 2, K: COLOR INIT.BackColor, INIT.ForeColor: PRINT " "; x$; " ";
ELSE
LOCATE rij + 2, K: COLOR INIT.ForeColor, INIT.BackColor: PRINT " *Error* ";
END IF
IF INIT.AltShooter = 0 THEN
LOCATE rij + 4, K: COLOR INIT.BackColor, INIT.ForeColor: PRINT " Normal ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " Second Color ";
ELSE
LOCATE rij + 4, K: COLOR INIT.ForeColor, INIT.BackColor: PRINT " Normal ";: COLOR INIT.BackColor, INIT.ForeColor: PRINT " Second Color ";
END IF
init_setup2:
DO: x$ = INKEY$: LOOP UNTIL x$ <> ""
'ESC = terugplaatsen van de waarden en uit init gaan
IF x$ = CHR$(27) THEN
INIT.FullScreen = O_FS
INIT.ColorScheme = O_CS$
INIT.ForeColor = O_FC
INIT.BackColor = O_BC
INIT.AltForeColor = O_AC
INIT.AltShooter = O_AS
EXIT SUB
END IF
'ENTER = gewoon terug gaan
IF x$ = CHR$(13) THEN EXIT SUB
'Save
IF x$ = "S" OR x$ = "s" THEN
FN$ = "AndroidNim.CFG"
ff = FREEFILE
OPEN FN$ FOR OUTPUT AS ff
PRINT #ff, INIT.FullScreen
PRINT #ff, INIT.ColorScheme
PRINT #ff, INIT.ForeColor
PRINT #ff, INIT.BackColor
PRINT #ff, INIT.AltForeColor
PRINT #ff, INIT.AltShooter
CLOSE ff
EXIT SUB
END IF
LOCATE rijp, K - 20: COLOR INIT.AltForeColor, INIT.BackColor: PRINT " ";
IF x$ = CHR$(0) + CHR$(80) THEN 'pijn beneden
rijp = rijp + 2: IF rijp = 13 THEN rijp = rij
END IF
IF x$ = CHR$(0) + CHR$(72) THEN 'pijl boven
rijp = rijp - 2: IF rijp = rij - 2 THEN rijp = 11
END IF
LOCATE rijp, K - 20: COLOR INIT.AltForeColor, INIT.BackColor: PRINT "ÍÍ";
IF x$ = " " THEN 'spatiebalk
SELECT CASE rijp
CASE 7 'fullscreen
IF INIT.FullScreen = 0 THEN INIT.FullScreen = 1 ELSE INIT.FullScreen = 0
CASE 9 'color scheme
H_ColorScheme = H_ColorScheme + 1: IF H_ColorScheme = 11 THEN H_ColorScheme = 1
INIT.ColorScheme = I_ColorScheme$(H_ColorScheme)
a = INSTR(INIT.ColorScheme, "|") + 1
INIT.ForeColor = VAL(MID$(INIT.ColorScheme, a, 2))
INIT.BackColor = VAL(MID$(INIT.ColorScheme, a + 3, 2))
INIT.AltForeColor = VAL(MID$(INIT.ColorScheme, a + 6, 2))
CASE 11 'Shooters
IF INIT.AltShooter = 0 THEN INIT.AltShooter = 1 ELSE INIT.AltShooter = 0
END SELECT
GOTO INIT_SETUP1
END IF
GOTO init_setup2
END SUB
SUB START_INFO
CLS
PRINT "ÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÛ";
PRINT "Û Android Nim was originally programmed by Leo Christopherson Û";
PRINT "Û on the TRS-80 model 1, 3 and 4. This version of Android Nim Û";
PRINT "Û Û Û was reprogrammed in the Windows environment by Luc Gevaert. Û";
PRINT "Û Û Û This program is programmed completely in text mode. Û";
PRINT "Û ÛÛÛÛÛÛ Û";
PRINT "Û ÛÛ ÛÛ ÛÛ Android Nim was Leo Christopherson's first game for the Û";
PRINT "Û ÛÛÛ ÛÛÛ TRS-80. It was featured on the cover of 80-Northwest Journal Û";
PRINT "Û ÛÛÛÛ (later 80-U.S. Journal) in November 1978 and was released by Û";
PRINT "Û ÛÛÛÛÛÛÛÛ 80-NW Publishing (later 80-U.S. Software). The cost was $8.00 Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ for cassette and $13.00 for disk, with a $2.00 discount for Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ 80-Northwest Journal subscribers. This great game helped to Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ popularize the magazine, and 80-U.S. Journal used an android Û";
PRINT "Û ÛÛÛ ÛÛÛ for its mascot until 1981. Û";
PRINT "Û Û Û Soon after the original release, Leo Christopherson enhanced Û";
PRINT "Û Û Û Android Nim with sound and more animation, developing the Û";
PRINT "Û ÛÛÛÛ ÛÛÛÛ techniques known as 'string-packing' and 'line-packing' in Û";
PRINT "Û the process. The enhanced version of Android Nim cost $14.95. Û";
PRINT "Û Like all of Leo Christopherson's TRS-80 games, Android Nim Û";
PRINT "Û was written in combination of BASIC and machine language. Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "Û Û";
PRINT "ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
LOCATE 22, 18: COLOR INIT.AltForeColor: PRINT AndroidNim$; ", version "; Version$; " by "; LucGev$; ", "; Belgium$;
LOCATE 25, 1: COLOR INIT.ForeColor: PRINT "Press ANY key to return...";
DO UNTIL INKEY$ <> "": LOOP
END SUB
SUB START_HELP
CLS
PRINT "ÛßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßÛ";
PRINT "Û Û";
PRINT "Û ÜÛÛÛÛÛÜ ÜÛÛÛÛÛÜ ÛÛÛÛÛÛÜ ÛÛÛÛÛÛÜ ÜÛÛÛÛÛÜ ÛÛÛÛ ÛÛÛÛÛÛÜ Û";
PRINT "Û Û Û ÛÛÜÜÜÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û Û Û ÛÛßßßÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛÛÛÛß ÛÛ ßÛÛ ßÛÛÛÛÛß ÛÛÛÛ ÛÛÛÛÛÛß Û";
PRINT "Û ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛÛ ÛÛÛ ÜÛÛÛÛÛÜ ÛÛÛÛ ÜÛÛÛÛÛÛÜ Û";
PRINT "Û ÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛÛÛÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ ÛÛ ÛÛ ÛÛÛÛ ÛÛ ÛÛ ÛÛ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ Û";
PRINT "Û ÛÛ ÛÛÛÛ ÛÛ At the bottom right you see whose turn it is. Then press Û";
PRINT "Û ÛÛÛ ÛÛÛ the number '";: COLOR INIT.AltForeColor: PRINT "1";:: COLOR INIT.ForeColor: PRINT "', '";
COLOR INIT.AltForeColor: PRINT "2";: COLOR INIT.ForeColor: PRINT "' or '";: COLOR INIT.AltForeColor: PRINT "3";: COLOR INIT.ForeColor: PRINT "', of the row you wish to remove Û";
PRINT "Û Û Û Androids from. Û";
PRINT "Û Û Û If you change your mind, press the '";: COLOR INIT.AltForeColor:: PRINT "Spacebar";: COLOR INIT.ForeColor: PRINT "', it erases. Û";
PRINT "Û ÛÛÛÛ ÛÛÛÛ If you wish to give up, press the '";: COLOR INIT.AltForeColor: PRINT "R";: COLOR INIT.ForeColor: PRINT "' key. Û";
PRINT "Û After you choose the row, press the number of Androids Û";
PRINT "Û you wish to remove. Û";
PRINT "Û ";: COLOR INIT.AltForeColor: PRINT "Rules:";: COLOR INIT.ForeColor: PRINT " you may remove as many Androids as you wish from Û";
PRINT "Û any row when it's your turn. To win, you must remove Û";
PRINT "Û the last Android. Û";
PRINT "Û Û";
PRINT "ßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßßß";
LOCATE 25, 1: PRINT "Press ANY key to return...";
DO UNTIL INKEY$ <> "": LOOP
END SUB
SUB ANIMATE_SHOOTERS
'*** Animeer de shooters
IF INIT.AltShooter = 1 THEN COLOR INIT.AltForeColor, INIT.BackColor
FOR r = 1 TO 3
k = ALOC_KOL(r, 0)
n = INT(RND * 17) + 1
SELECT CASE n
CASE 1 'roepen
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_05$;
CASE 2 'up
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_06$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_07$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 3 'down
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_09$;
CASE 4 'left 1
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 5 'left 2 (+ left 1)
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_12$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_13$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 6 'right 1
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 7 'right 2 (+ right 1)
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_16$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_17$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 8 TO 15 'gewoon
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE ELSE
' niets doen
END SELECT
NEXT
END SUB
SUB ANIMATE_ANDROIDS
'*** Animeer de androids
COLOR INIT.ForeColor, INIT.BackColor
FOR r = 1 TO 3
FOR l = 1 TO 7
'IF l <= AIR(r) THEN
k = ALOC_KOL(r, l)
IF k <> 0 THEN
n = INT(RND * 25) + 1 'wat bewegen?
SELECT CASE n
CASE 1 'roepen
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_05$;
_DELAY .2
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 2 'up
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_06$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_07$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 3 'down
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_09$;
CASE 4 'left 1
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 5 'left 2 (+ left 1)
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_12$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_13$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 6 'right 1
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 7 'right 2 (+ right 1)
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_16$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_17$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 8 TO 15 'gewoon
LOCATE ALOC_RIJ(r), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(r) + 5, k: PRINT AN_HOOFD_04$;
CASE 16 'body hang rechts
LOCATE ALOC_RIJ(r) + 6, k: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(r) + 7, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 8, k: PRINT AN_BODY_07$;
LOCATE ALOC_RIJ(r) + 9, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 10, k: PRINT AN_BODY_08$;
CASE 17 'body hang links
LOCATE ALOC_RIJ(r) + 6, k: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(r) + 7, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 8, k: PRINT AN_BODY_09$;
LOCATE ALOC_RIJ(r) + 9, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 10, k: PRINT AN_BODY_10$;
CASE 18 'body hang beide
LOCATE ALOC_RIJ(r) + 6, k: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(r) + 7, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 8, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 9, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 10, k: PRINT AN_BODY_11$;
CASE 19 'body janet rechts
LOCATE ALOC_RIJ(r) + 6, k: PRINT AN_BODY_12$;
LOCATE ALOC_RIJ(r) + 7, k: PRINT AN_BODY_13$;
LOCATE ALOC_RIJ(r) + 8, k: PRINT AN_BODY_14$;
LOCATE ALOC_RIJ(r) + 9, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 10, k: PRINT AN_BODY_15$;
CASE 20 'body janet links
LOCATE ALOC_RIJ(r) + 6, k: PRINT AN_BODY_12$;
LOCATE ALOC_RIJ(r) + 7, k: PRINT AN_BODY_16$;
LOCATE ALOC_RIJ(r) + 8, k: PRINT AN_BODY_17$;
LOCATE ALOC_RIJ(r) + 9, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 10, k: PRINT AN_BODY_18$;
CASE 21 'body janet beide
LOCATE ALOC_RIJ(r) + 6, k: PRINT AN_BODY_12$;
LOCATE ALOC_RIJ(r) + 7, k: PRINT AN_BODY_12$;
LOCATE ALOC_RIJ(r) + 8, k: PRINT AN_BODY_12$;
LOCATE ALOC_RIJ(r) + 9, k: PRINT AN_BODY_02$;
LOCATE ALOC_RIJ(r) + 10, k: PRINT AN_BODY_19$;
CASE ELSE
' niets doen
END SELECT
END IF
NEXT
NEXT
END SUB
SUB WIS_ANDROIDS
'wis op locate SR de eerste NR androids
'android kijkt naar links
IF INIT.AltShooter = 1 THEN COLOR INIT.AltForeColor, INIT.BackColor
k = ALOC_KOL(SR, 0)
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_12$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_13$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .35
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
'android kijkt voor zich uit
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .3
'android roept
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_05$;
_DELAY .35
'android kijkt voor zich uit
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
'android kijkt naar rechts
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_16$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_17$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .35
'android draait hoofd naar start
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
'android kijkt voor zich uit
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
'ja knikken
FOR a = 1 TO INT(RND * 3) + 1
'up
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_06$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_07$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
'android kijkt voor zich uit
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
'down
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_09$;
_DELAY .2
'android kijkt voor zich uit
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
NEXT
'android kijkt naar rechts
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_16$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_17$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .2
'pakt wapen 1
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_32$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_21$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_20$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_05$;
_DELAY .2
'wapen 2
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_32$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_22$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_23$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_24$;
_DELAY .2
'pakt wapen 3
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_01$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_33$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_26$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_27$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_28$;
_DELAY .35
'wapen 4
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_29$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_34$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_31$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_30$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_28$;
_DELAY .2
'alle andere androids moeten toekijken
IF SR = 1 THEN
'rij 1: kijkt links, rij 2 up, rij 3 up
a$ = "LUU"
ELSEIF SR = 2 THEN
'rij 2: rij 1 down, rij 3 up, rij 2 links
a$ = "DLU"
ELSE
'rij 3: iedereen down, rij 3 links
a$ = "DDL"
END IF
COLOR INIT.ForeColor, INIT.BackColor
FOR r = 1 TO 3
x$ = MID$(a$, r, 1) 'U(up) D(down) L(left)
FOR k = 1 TO 7
IF ALOC_KOL(r, k) <> 0 THEN 'er is een android
ko = ALOC_KOL(r, k)
SELECT CASE x$
CASE "U"
LOCATE ALOC_RIJ(r), ko: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(r) + 1, ko: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, ko: PRINT AN_HOOFD_06$;
LOCATE ALOC_RIJ(r) + 3, ko: PRINT AN_HOOFD_07$;
LOCATE ALOC_RIJ(r) + 4, ko: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(r) + 5, ko: PRINT AN_HOOFD_04$;
CASE "D"
LOCATE ALOC_RIJ(r), ko: PRINT AN_ANTENNE_00$;
LOCATE ALOC_RIJ(r) + 1, ko: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(r) + 2, ko: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, ko: PRINT AN_HOOFD_08$;
LOCATE ALOC_RIJ(r) + 4, ko: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(r) + 5, ko: PRINT AN_HOOFD_09$;
CASE ELSE 'L
LOCATE ALOC_RIJ(r), ko: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 1, ko: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(r) + 2, ko: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, ko: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(r) + 4, ko: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(r) + 5, ko: PRINT AN_HOOFD_04$;
_DELAY .1
LOCATE ALOC_RIJ(r), ko: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(r) + 1, ko: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(r) + 2, ko: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(r) + 3, ko: PRINT AN_HOOFD_12$;
LOCATE ALOC_RIJ(r) + 4, ko: PRINT AN_HOOFD_13$;
LOCATE ALOC_RIJ(r) + 5, ko: PRINT AN_HOOFD_04$;
END SELECT
_DELAY .2
END IF
NEXT
NEXT
' s = start van de eerste android
FOR k = 1 TO 7
IF ALOC_KOL(SR, k) <> 0 THEN s = k: EXIT FOR
NEXT
'e = s + #aantalwegtedoen
IF INIT.AltShooter = 1 THEN COLOR INIT.AltForeColor, INIT.BackColor ELSE COLOR INIT.ForeColor, INIT.BackColor
FOR k = s TO (s + NR) - 1
IF INIT.AltShooter = 1 THEN COLOR INIT.AltForeColor, INIT.BackColor ELSE COLOR INIT.ForeColor, INIT.BackColor
FOR a = ALOC_KOL(SR, 0) + 11 TO ALOC_KOL(SR, k) STEP 3
LOCATE ALOC_RIJ(SR) + 6, ALOC_KOL(SR, 0) + 10
_LIMIT 30
IF a AND NOT -2 THEN PRINT "="; ELSE PRINT "Û";
_LIMIT 70
LOCATE ALOC_RIJ(SR) + 6, a: PRINT "===-";
NEXT
LOCATE ALOC_RIJ(SR) + 6, ALOC_KOL(SR, 0) + 9: PRINT "-=";
COLOR INIT.ForeColor, INIT.BackColor
FOR a = 1 TO 7
_LIMIT 70
LOCATE ALOC_RIJ(SR) + 7 - a, ALOC_KOL(SR, k)
PRINT STRING$(6, "Û");
LOCATE ALOC_RIJ(SR) + 6 + a, ALOC_KOL(SR, k)
PRINT STRING$(6, "Û");
NEXT
_DELAY .2
FOR a = 1 TO 7:
LOCATE ALOC_RIJ(SR) + 7 - a, ALOC_KOL(SR, k)
_LIMIT 70
PRINT STRING$(6, " ");
LOCATE ALOC_RIJ(SR) + 6 + a, ALOC_KOL(SR, k)
PRINT STRING$(6, " ");
NEXT
_DELAY .2
FOR a = ALOC_KOL(SR, 0) + 11 TO ALOC_KOL(SR, k) STEP 3
_LIMIT 70
LOCATE ALOC_RIJ(SR) + 6, a: PRINT " ";
NEXT
ALOC_KOL(SR, k) = 0
NEXT
_LIMIT 1000
'arm shooter terug zetten
x$ = " ": k = ALOC_KOL(SR, 0)
IF INIT.AltShooter = 1 THEN COLOR INIT.AltForeColor, INIT.BackColor
'pakt wapen 3
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_01$; x$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_33$; x$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_26$; x$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_27$; x$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_28$; x$;
_DELAY .2
'wapen 2
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_01$; x$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_32$; x$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_22$; x$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_23$; x$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_24$; x$;
_DELAY .2
'pakt wapen 1
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_01$; x$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_32$; x$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_21$; x$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_20$; x$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_05$; x$;
_DELAY .2
'back to normal
LOCATE ALOC_RIJ(SR) + 6, k: PRINT AN_BODY_01$; x$;
LOCATE ALOC_RIJ(SR) + 7, k: PRINT AN_BODY_06$; x$;
LOCATE ALOC_RIJ(SR) + 8, k: PRINT AN_BODY_03$; x$;
LOCATE ALOC_RIJ(SR) + 9, k: PRINT AN_BODY_04$; x$;
LOCATE ALOC_RIJ(SR) + 10, k: PRINT AN_BODY_05$; x$;
'wis de nr en aantallen links vd shooters
FOR a = 1 TO 3
LOCATE ALOC_RIJ(a) + 3, 1: PRINT " ";
LOCATE ALOC_RIJ(a) + 4, 1: PRINT " ";
LOCATE ALOC_RIJ(a) + 5, 1: PRINT " ";
LOCATE ALOC_RIJ(a) + 7, 1: PRINT " ";
LOCATE ALOC_RIJ(a) + 8, 1: PRINT " ";
LOCATE ALOC_RIJ(a) + 9, 1: PRINT " ";
NEXT
_DELAY .2
' aangezien de AIR(x) niet goed loopt wordt hier opnieuw geteld.
FOR r = 1 TO 3
AIR(r) = 0
FOR k = 1 TO 7
IF ALOC_KOL(r, k) <> 0 THEN AIR(r) = AIR(r) + 1
NEXT
NEXT
END SUB
SUB Knik_Nee
'knik neen wanneer foute ingave
'locatie op SR
LOCATE ALOC_RIJ(SR) + 3, 1: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 4, 1: PRINT STR$(SR); " ";
LOCATE ALOC_RIJ(SR) + 5, 1: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor
LOCATE ALOC_RIJ(SR) + 7, 1: COLOR INIT.BackColor, INIT.ForeColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 8, 1: PRINT " X ";
LOCATE ALOC_RIJ(SR) + 9, 1: PRINT " ";: COLOR INIT.ForeColor, INIT.BackColor
IF INIT.AltShooter = 1 THEN COLOR INIT.AltForeColor, INIT.BackColor ELSE COLOR INIT.ForeColor, INIT.BackColor
k = ALOC_KOL(SR, 0)
FOR a = 1 TO INT(RND * 3) + 2
'android kijkt voor zich uit
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_L2$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_12$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_13$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_L1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_10$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_11$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
'android kijkt voor zich uit
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_01$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_02$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_03$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
'android kijkt naar rechts
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R2$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_16$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_17$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
LOCATE ALOC_RIJ(SR), k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 1, k: PRINT AN_ANTENNE_R1$;
LOCATE ALOC_RIJ(SR) + 2, k: PRINT AN_HOOFD_01$;
LOCATE ALOC_RIJ(SR) + 3, k: PRINT AN_HOOFD_14$;
LOCATE ALOC_RIJ(SR) + 4, k: PRINT AN_HOOFD_15$;
LOCATE ALOC_RIJ(SR) + 5, k: PRINT AN_HOOFD_04$;
_DELAY .15
NEXT
LOCATE ALOC_RIJ(SR) + 3, 1: COLOR INIT.ForeColor, INIT.BackColor: PRINT " ";
LOCATE ALOC_RIJ(SR) + 4, 1: PRINT " ";
LOCATE ALOC_RIJ(SR) + 5, 1: PRINT " ";
LOCATE ALOC_RIJ(SR) + 7, 1: PRINT " ";
LOCATE ALOC_RIJ(SR) + 8, 1: PRINT " ";
LOCATE ALOC_RIJ(SR) + 9, 1: PRINT " ";
_DELAY .25
END SUB
SUB WIS_VELD
COLOR INIT.ForeColor, INIT.BackColor
FOR a = 2 TO 49
LOCATE a, 14
PRINT SPACE$(65);
NEXT
END SUB
SUB I_WIN
_DELAY 1
WIS_VELD
LOCATE 22, 30: PRINT "ÞÛÛÝ ÛÛ ÛÛ ÛÛ ÞÛÛÝ ÜÛÛÛÛÛÜ";
LOCATE 23, 30: PRINT " ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ";
LOCATE 24, 30: PRINT " ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ ÛÛ";
LOCATE 25, 30: PRINT "ÞÛÛÝ ßÛÛÛÛÛÛß ÞÛÛÝ ÛÛ ÛÛ";
LOCATE 28, 29: PRINT "Another game? Press ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " Y ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " or ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " N ";: COLOR INIT.ForeColor, INIT.BackColor
DO
x$ = LCASE$(INKEY$)
ANIMATE_SHOOTERS
LOOP UNTIL x$ = "y" OR x$ = "n"
IF x$ = "n" THEN Wie = -255 ELSE Wie = 0
END SUB
SUB HUMAN_WIN
_DELAY 1
WIS_VELD
LOCATE 22, 30: PRINT "Through Some Amazingly Graceful"
LOCATE 24, 30: PRINT "but"
LOCATE 26, 30: PRINT "Personal Miscalculation,"
LOCATE 28, 36: PRINT "YOU WIN !?"
COLOR INIT.AltForeColor, INIT.BackColor
FOR x = 1 TO 10
CHOOSE_WORD:
W = INT(RND * 80) + 1
IF CHOSEN_WORDS(W) = 1 THEN GOTO CHOOSE_WORD
CHOSEN_WORDS(W) = 1
CURRENT_WORD$ = WORD$(W)
LOCATE 24, 34: PRINT SPACE$(20);
LOCATE 24, 34: PRINT CURRENT_WORD$;
_DELAY (RND * 0.7) + 1
ANIMATE_SHOOTERS
NEXT
LOCATE 30, 30: PRINT "Another game? Press ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " Y ";: COLOR INIT.ForeColor, INIT.BackColor: PRINT " or ";
COLOR INIT.BackColor, INIT.ForeColor: PRINT " N ";: COLOR INIT.ForeColor, INIT.BackColor
DO
x$ = LCASE$(INKEY$)
ANIMATE_SHOOTERS
LOOP UNTIL x$ = "y" OR x$ = "n"
IF x$ = "n" THEN Wie = -255 ELSE Wie = 0
END SUB