I'm trying to write an old style early-age computer game. The battle sequence I'm trying to create won't often won't show the ships until it is moved. Sometimes I get a subscript out of range. I'm including the code. Most of it is totally repetitive, trying to draw one of the ships. Please help.
WIDTH 80, 50
CONST shotDelay = 0.03
CONST fireBeep = "L64O3CEGAA"
CONST shipHitBeep = "L64O1EEEEEL16CC"
DIM SHARED battleScreen(1 TO 80, 1 TO 45, 1 TO 2)
FOR fillY = 1 TO 45
FOR fillX = 1 TO 80
battleScreen(fillX, fillY, 1) = 32
battleScreen(fillX, fillY, 2) = 0
NEXT fillX
NEXT fillY
RANDOMIZE TIMER
COLOR 0, 0
CLS
LOCATE 1, 1
CALL Battle
SUB PrintBattleScreen ()
CLS: LOCATE 1, 1
FOR printY = 1 TO 45
FOR printX = 1 TO 80
IF printX <> 80 THEN
COLOR battleScreen(printX, printY, 2), 0
PRINT CHR$(battleScreen(printX, printY, 1));
ELSE
COLOR battleScreen(printX, printY, 2), 0
PRINT CHR$(battleScreen(printX, printY, 1))
END IF
NEXT printX
NEXT printY
END SUB
SUB RelocateSarain
END SUB
SUB Battle
'randNum% = INT(RND * (max% - min% + 1)) + min%
xPos = INT(RND * 71) + 5
yPos = INT(RND * 41) + 5
intFacing = INT(RND * 4) + 1: IF intFacing = 1 THEN facing$ = "N": IF intFacing = 2 THEN facing$ = "S": IF intFacing = 3 THEN facing$ = "W": IF intFacing = 4 THEN facing$ = "E"
CALL DrawEspializer(xPos, yPos, facing$)
xPos = INT(RND * 71) + 5
yPos = INT(RND * 41) + 5
intFacing = INT(RND * 4) + 1: IF intFacing = 1 THEN facing$ = "N": IF intFacing = 2 THEN facing$ = "S": IF intFacing = 3 THEN facing$ = "W": IF intFacing = 4 THEN facing$ = "E"
CALL DrawSarian(xPos, yPos, facing$)
CALL PrintBattleScreen
DO
whichMove$ = INKEY$
SELECT CASE whichMove$
CASE CHR$(0) + "H" ' up
IF yPos > 5 THEN
CALL EraseEspializer(xPos, yPos, facing$)
yPos = yPos - 1: facing$ = "N"
CALL DrawEspializer(xPos, yPos, facing$)
CALL PrintBattleScreen
END IF
CASE CHR$(0) + "K" ' left
IF xPos > 5 THEN
CALL EraseEspializer(xPos, yPos, facing$)
xPos = xPos - 1: facing$ = "W"
CALL DrawEspializer(xPos, yPos, facing$)
CALL PrintBattleScreen
END IF
CASE CHR$(0) + "P" ' down
IF yPos < 40 THEN
CALL EraseEspializer(xPos, yPos, facing$)
yPos = yPos + 1: facing$ = "S"
CALL DrawEspializer(xPos, yPos, facing$)
CALL PrintBattleScreen
END IF
CASE CHR$(0) + "M" ' right
IF xPos < 75 THEN
CALL EraseEspializer(xPos, yPos, facing$)
xPos = xPos + 1: facing$ = "E"
CALL DrawEspializer(xPos, yPos, facing$)
CALL PrintBattleScreen
END IF
CASE CHR$(27)
END
END SELECT
' _DELAY (0.05)
' FOR moveIt = 40 TO 50
' CALL DrawEspializer(moveIt, 22, "E")
' CALL PrintBattleScreen
' _DELAY (0.05)
' CALL EraseEspializer(moveIt, 22, "E")
' CALL PrintBattleScreen
' NEXT moveIt
LOOP UNTIL whichMove$ = CHR$(27)
END SUB
SUB DrawSarian (centerX, centerY, orientation$)
SELECT CASE orientation$
CASE "N"
battleScreen(centerX - 1, centerY + 0, 1) = 219: battleScreen(centerX - 1, centerY + 0, 2) = 10
battleScreen(centerX + 1, centerY + 0, 1) = 219: battleScreen(centerX + 1, centerY + 0, 2) = 10
battleScreen(centerX + 0, centerY - 1, 1) = 219: battleScreen(centerX + 0, centerY - 1, 2) = 10
CASE "S"
battleScreen(centerX - 1, centerY + 0, 1) = 219: battleScreen(centerX - 1, centerY + 0, 2) = 10
battleScreen(centerX + 1, centerY + 0, 1) = 219: battleScreen(centerX + 1, centerY + 0, 2) = 10
battleScreen(centerX + 0, centerY + 1, 1) = 219: battleScreen(centerX + 0, centerY + 1, 2) = 10
CASE "W"
battleScreen(centerX - 1, centerY + 0, 1) = 219: battleScreen(centerX - 1, centerY + 0, 2) = 10
battleScreen(centerX + 1, centerY - 1, 1) = 219: battleScreen(centerX + 1, centerY - 1, 2) = 10
battleScreen(centerX + 1, centerY + 1, 1) = 219: battleScreen(centerX + 1, centerY + 1, 2) = 10
CASE "E"
battleScreen(centerX + 1, centerY + 0, 1) = 219: battleScreen(centerX + 1, centerY + 0, 2) = 10
battleScreen(centerX - 1, centerY - 1, 1) = 219: battleScreen(centerX - 1, centerY - 1, 2) = 10
battleScreen(centerX - 1, centerY + 1, 1) = 219: battleScreen(centerX - 1, centerY + 1, 2) = 10
END SELECT
END SUB
SUB EraseSerian (centerx, centery, orientation$)
SELECT CASE orientation$
CASE "N"
battleScreen(centerx - 1, centery + 0, 1) = 219: battleScreen(centerx - 1, centery + 0, 2) = 0
battleScreen(centerx + 1, centery + 0, 1) = 219: battleScreen(centerx + 1, centery + 0, 2) = 0
battleScreen(centerx + 0, centery - 1, 1) = 219: battleScreen(centerx + 0, centery - 1, 2) = 0
CASE "S"
battleScreen(centerx - 1, centery + 0, 1) = 219: battleScreen(centerx - 1, centery + 0, 2) = 0
battleScreen(centerx + 1, centery + 0, 1) = 219: battleScreen(centerx + 1, centery + 0, 2) = 0
battleScreen(centerx + 0, centery + 1, 1) = 219: battleScreen(centerx + 0, centery + 1, 2) = 0
CASE "W"
battleScreen(centerx - 1, centery + 0, 1) = 219: battleScreen(centerx - 1, centery + 0, 2) = 0
battleScreen(centerx + 1, centery - 1, 1) = 219: battleScreen(centerx + 1, centery - 1, 2) = 0
battleScreen(centerx + 1, centery + 1, 1) = 219: battleScreen(centerx + 1, centery + 1, 2) = 0
CASE "E"
battleScreen(centerx + 1, centery + 0, 1) = 219: battleScreen(centerx + 1, centery + 0, 2) = 0
battleScreen(centerx - 1, centery - 1, 1) = 219: battleScreen(centerx - 1, centery - 1, 2) = 0
battleScreen(centerx - 1, centery + 1, 1) = 219: battleScreen(centerx - 1, centery + 1, 2) = 0
END SELECT
END SUB
SUB DrawEspializer (centerX, centerY, orientation$)
SELECT CASE orientation$
CASE "E"
battleScreen(centerX - 4, centerY - 3, 1) = 219: battleScreen(centerX - 4, centerY - 3, 2) = 9
battleScreen(centerX - 3, centerY - 3, 1) = 219: battleScreen(centerX - 3, centerY - 3, 2) = 9
battleScreen(centerX - 2, centerY - 3, 1) = 219: battleScreen(centerX - 2, centerY - 3, 2) = 9
battleScreen(centerX - 1, centerY - 3, 1) = 219: battleScreen(centerX - 1, centerY - 3, 2) = 9
battleScreen(centerX - 0, centerY - 3, 1) = 219: battleScreen(centerX - 0, centerY - 3, 2) = 9
battleScreen(centerX - 4, centerY + 3, 1) = 219: battleScreen(centerX - 4, centerY + 3, 2) = 9
battleScreen(centerX - 3, centerY + 3, 1) = 219: battleScreen(centerX - 3, centerY + 3, 2) = 9
battleScreen(centerX - 2, centerY + 3, 1) = 219: battleScreen(centerX - 2, centerY + 3, 2) = 9
battleScreen(centerX - 1, centerY + 3, 1) = 219: battleScreen(centerX - 1, centerY + 3, 2) = 9
battleScreen(centerX - 0, centerY + 3, 1) = 219: battleScreen(centerX - 0, centerY + 3, 2) = 9
battleScreen(centerX + 0, centerY - 2, 1) = 219: battleScreen(centerX + 0, centerY - 2, 2) = 15
battleScreen(centerX + 1, centerY - 2, 1) = 219: battleScreen(centerX + 1, centerY - 2, 2) = 15
battleScreen(centerX + 2, centerY - 2, 1) = 219: battleScreen(centerX + 2, centerY - 2, 2) = 15
battleScreen(centerX + 1, centerY - 1, 1) = 219: battleScreen(centerX + 1, centerY - 1, 2) = 15
battleScreen(centerX + 2, centerY - 1, 1) = 219: battleScreen(centerX + 2, centerY - 1, 2) = 15
battleScreen(centerX + 3, centerY - 1, 1) = 219: battleScreen(centerX + 3, centerY - 1, 2) = 15
battleScreen(centerX + 1, centerY + 0, 1) = 219: battleScreen(centerX + 1, centerY + 0, 2) = 15
battleScreen(centerX + 2, centerY + 0, 1) = 219: battleScreen(centerX + 2, centerY + 0, 2) = 15
battleScreen(centerX + 3, centerY + 0, 1) = 219: battleScreen(centerX + 3, centerY + 0, 2) = 15
battleScreen(centerX + 4, centerY + 0, 1) = 219: battleScreen(centerX + 4, centerY + 0, 2) = 15
battleScreen(centerX + 1, centerY + 1, 1) = 219: battleScreen(centerX + 1, centerY + 1, 2) = 15
battleScreen(centerX + 2, centerY + 1, 1) = 219: battleScreen(centerX + 2, centerY + 1, 2) = 15
battleScreen(centerX + 3, centerY + 1, 1) = 219: battleScreen(centerX + 3, centerY + 1, 2) = 15
battleScreen(centerX + 0, centerY + 2, 1) = 219: battleScreen(centerX + 0, centerY + 2, 2) = 15
battleScreen(centerX + 1, centerY + 2, 1) = 219: battleScreen(centerX + 1, centerY + 2, 2) = 15
battleScreen(centerX + 2, centerY + 2, 1) = 219: battleScreen(centerX + 2, centerY + 2, 2) = 15
CASE "W"
battleScreen(centerX + 0, centerY - 3, 1) = 219: battleScreen(centerX + 0, centerY - 3, 2) = 9
battleScreen(centerX + 1, centerY - 3, 1) = 219: battleScreen(centerX + 1, centerY - 3, 2) = 9
battleScreen(centerX + 2, centerY - 3, 1) = 219: battleScreen(centerX + 2, centerY - 3, 2) = 9
battleScreen(centerX + 3, centerY - 3, 1) = 219: battleScreen(centerX + 3, centerY - 3, 2) = 9
battleScreen(centerX + 4, centerY - 3, 1) = 219: battleScreen(centerX + 4, centerY - 3, 2) = 9
battleScreen(centerX + 0, centerY + 3, 1) = 219: battleScreen(centerX + 0, centerY + 3, 2) = 9
battleScreen(centerX + 1, centerY + 3, 1) = 219: battleScreen(centerX + 1, centerY + 3, 2) = 9
battleScreen(centerX + 2, centerY + 3, 1) = 219: battleScreen(centerX + 2, centerY + 3, 2) = 9
battleScreen(centerX + 3, centerY + 3, 1) = 219: battleScreen(centerX + 3, centerY + 3, 2) = 9
battleScreen(centerX + 4, centerY + 3, 1) = 219: battleScreen(centerX + 4, centerY + 3, 2) = 9
battleScreen(centerX - 2, centerY - 2, 1) = 219: battleScreen(centerX - 2, centerY - 2, 2) = 15
battleScreen(centerX - 1, centerY - 2, 1) = 219: battleScreen(centerX - 1, centerY - 2, 2) = 15
battleScreen(centerX - 0, centerY - 2, 1) = 219: battleScreen(centerX - 0, centerY - 2, 2) = 15
battleScreen(centerX - 2, centerY + 2, 1) = 219: battleScreen(centerX - 2, centerY + 2, 2) = 15
battleScreen(centerX - 1, centerY + 2, 1) = 219: battleScreen(centerX - 1, centerY + 2, 2) = 15
battleScreen(centerX - 0, centerY + 2, 1) = 219: battleScreen(centerX - 0, centerY + 2, 2) = 15
battleScreen(centerX - 3, centerY - 1, 1) = 219: battleScreen(centerX - 3, centerY - 1, 2) = 15
battleScreen(centerX - 2, centerY - 1, 1) = 219: battleScreen(centerX - 2, centerY - 1, 2) = 15
battleScreen(centerX - 1, centerY - 1, 1) = 219: battleScreen(centerX - 1, centerY - 1, 2) = 15
battleScreen(centerX - 3, centerY + 1, 1) = 219: battleScreen(centerX - 3, centerY + 1, 2) = 15
battleScreen(centerX - 2, centerY + 1, 1) = 219: battleScreen(centerX - 2, centerY + 1, 2) = 15
battleScreen(centerX - 1, centerY + 1, 1) = 219: battleScreen(centerX - 1, centerY + 1, 2) = 15
battleScreen(centerX - 4, centerY + 0, 1) = 219: battleScreen(centerX - 4, centerY + 0, 2) = 15
battleScreen(centerX - 3, centerY + 0, 1) = 219: battleScreen(centerX - 3, centerY + 0, 2) = 15
battleScreen(centerX - 2, centerY + 0, 1) = 219: battleScreen(centerX - 2, centerY + 0, 2) = 15
battleScreen(centerX - 1, centerY + 0, 1) = 219: battleScreen(centerX - 1, centerY + 0, 2) = 15
CASE "S"
battleScreen(centerX - 3, centerY - 4, 1) = 219: battleScreen(centerX - 3, centerY - 4, 2) = 9
battleScreen(centerX - 3, centerY - 3, 1) = 219: battleScreen(centerX - 3, centerY - 3, 2) = 9
battleScreen(centerX - 3, centerY - 2, 1) = 219: battleScreen(centerX - 3, centerY - 2, 2) = 9
battleScreen(centerX - 3, centerY - 1, 1) = 219: battleScreen(centerX - 3, centerY - 1, 2) = 9
battleScreen(centerX - 3, centerY - 0, 1) = 219: battleScreen(centerX - 3, centerY - 0, 2) = 9
battleScreen(centerX + 3, centerY - 4, 1) = 219: battleScreen(centerX + 3, centerY - 4, 2) = 9
battleScreen(centerX + 3, centerY - 3, 1) = 219: battleScreen(centerX + 3, centerY - 3, 2) = 9
battleScreen(centerX + 3, centerY - 2, 1) = 219: battleScreen(centerX + 3, centerY - 2, 2) = 9
battleScreen(centerX + 3, centerY - 1, 1) = 219: battleScreen(centerX + 3, centerY - 1, 2) = 9
battleScreen(centerX + 3, centerY - 0, 1) = 219: battleScreen(centerX + 3, centerY - 0, 2) = 9
battleScreen(centerX - 2, centerY + 0, 1) = 219: battleScreen(centerX - 2, centerY + 0, 2) = 15
battleScreen(centerX - 2, centerY + 1, 1) = 219: battleScreen(centerX - 2, centerY + 1, 2) = 15
battleScreen(centerX - 2, centerY + 2, 1) = 219: battleScreen(centerX - 2, centerY + 2, 2) = 15
battleScreen(centerX + 2, centerY + 0, 1) = 219: battleScreen(centerX + 2, centerY + 0, 2) = 15
battleScreen(centerX + 2, centerY + 1, 1) = 219: battleScreen(centerX + 2, centerY + 1, 2) = 15
battleScreen(centerX + 2, centerY + 2, 1) = 219: battleScreen(centerX + 2, centerY + 2, 2) = 15
battleScreen(centerX - 1, centerY + 1, 1) = 219: battleScreen(centerX - 1, centerY + 1, 2) = 15
battleScreen(centerX - 1, centerY + 2, 1) = 219: battleScreen(centerX - 1, centerY + 2, 2) = 15
battleScreen(centerX - 1, centerY + 3, 1) = 219: battleScreen(centerX - 1, centerY + 3, 2) = 15
battleScreen(centerX + 1, centerY + 1, 1) = 219: battleScreen(centerX + 1, centerY + 1, 2) = 15
battleScreen(centerX + 1, centerY + 2, 1) = 219: battleScreen(centerX + 1, centerY + 2, 2) = 15
battleScreen(centerX + 1, centerY + 3, 1) = 219: battleScreen(centerX + 1, centerY + 3, 2) = 15
battleScreen(centerX + 0, centerY + 1, 1) = 219: battleScreen(centerX + 0, centerY + 1, 2) = 15
battleScreen(centerX + 0, centerY + 2, 1) = 219: battleScreen(centerX + 0, centerY + 2, 2) = 15
battleScreen(centerX + 0, centerY + 3, 1) = 219: battleScreen(centerX + 0, centerY + 3, 2) = 15
battleScreen(centerX + 0, centerY + 4, 1) = 219: battleScreen(centerX + 0, centerY + 4, 2) = 15
CASE "N"
battleScreen(centerX - 3, centerY + 0, 1) = 219: battleScreen(centerX - 3, centerY + 0, 2) = 9
battleScreen(centerX - 3, centerY + 1, 1) = 219: battleScreen(centerX - 3, centerY + 1, 2) = 9
battleScreen(centerX - 3, centerY + 2, 1) = 219: battleScreen(centerX - 3, centerY + 2, 2) = 9
battleScreen(centerX - 3, centerY + 3, 1) = 219: battleScreen(centerX - 3, centerY + 3, 2) = 9
battleScreen(centerX - 3, centerY + 4, 1) = 219: battleScreen(centerX - 3, centerY + 4, 2) = 9
battleScreen(centerX + 3, centerY + 0, 1) = 219: battleScreen(centerX + 3, centerY + 0, 2) = 9
battleScreen(centerX + 3, centerY + 1, 1) = 219: battleScreen(centerX + 3, centerY + 1, 2) = 9
battleScreen(centerX + 3, centerY + 2, 1) = 219: battleScreen(centerX + 3, centerY + 2, 2) = 9
battleScreen(centerX + 3, centerY + 3, 1) = 219: battleScreen(centerX + 3, centerY + 3, 2) = 9
battleScreen(centerX + 3, centerY + 4, 1) = 219: battleScreen(centerX + 3, centerY + 4, 2) = 9
battleScreen(centerX - 2, centerY - 2, 1) = 219: battleScreen(centerX - 2, centerY - 2, 2) = 15
battleScreen(centerX - 2, centerY - 1, 1) = 219: battleScreen(centerX - 2, centerY - 1, 2) = 15
battleScreen(centerX - 2, centerY - 0, 1) = 219: battleScreen(centerX - 2, centerY - 0, 2) = 15
battleScreen(centerX + 2, centerY - 2, 1) = 219: battleScreen(centerX + 2, centerY - 2, 2) = 15
battleScreen(centerX + 2, centerY - 1, 1) = 219: battleScreen(centerX + 2, centerY - 1, 2) = 15
battleScreen(centerX + 2, centerY - 0, 1) = 219: battleScreen(centerX + 2, centerY - 0, 2) = 15
battleScreen(centerX - 1, centerY - 3, 1) = 219: battleScreen(centerX - 1, centerY - 3, 2) = 15
battleScreen(centerX - 1, centerY - 2, 1) = 219: battleScreen(centerX - 1, centerY - 2, 2) = 15
battleScreen(centerX - 1, centerY - 1, 1) = 219: battleScreen(centerX - 1, centerY - 1, 2) = 15
battleScreen(centerX + 1, centerY - 3, 1) = 219: battleScreen(centerX + 1, centerY - 3, 2) = 15
battleScreen(centerX + 1, centerY - 2, 1) = 219: battleScreen(centerX + 1, centerY - 2, 2) = 15
battleScreen(centerX + 1, centerY - 1, 1) = 219: battleScreen(centerX + 1, centerY - 1, 2) = 15
battleScreen(centerX + 0, centerY - 4, 1) = 219: battleScreen(centerX + 0, centerY - 4, 2) = 15
battleScreen(centerX + 0, centerY - 3, 1) = 219: battleScreen(centerX + 0, centerY - 3, 2) = 15
battleScreen(centerX + 0, centerY - 2, 1) = 219: battleScreen(centerX + 0, centerY - 2, 2) = 15
battleScreen(centerX + 0, centerY - 1, 1) = 219: battleScreen(centerX + 0, centerY - 1, 2) = 15
END SELECT
END SUB
SUB EraseEspializer (centerX, centerY, orientation$)
SELECT CASE orientation$
CASE "E"
battleScreen(centerX - 4, centerY - 3, 1) = 219: battleScreen(centerX - 4, centerY - 3, 2) = 0
battleScreen(centerX - 3, centerY - 3, 1) = 219: battleScreen(centerX - 3, centerY - 3, 2) = 0
battleScreen(centerX - 2, centerY - 3, 1) = 219: battleScreen(centerX - 2, centerY - 3, 2) = 0
battleScreen(centerX - 1, centerY - 3, 1) = 219: battleScreen(centerX - 1, centerY - 3, 2) = 0
battleScreen(centerX - 0, centerY - 3, 1) = 219: battleScreen(centerX - 0, centerY - 3, 2) = 0
battleScreen(centerX - 4, centerY + 3, 1) = 219: battleScreen(centerX - 4, centerY + 3, 2) = 0
battleScreen(centerX - 3, centerY + 3, 1) = 219: battleScreen(centerX - 3, centerY + 3, 2) = 0
battleScreen(centerX - 2, centerY + 3, 1) = 219: battleScreen(centerX - 2, centerY + 3, 2) = 0
battleScreen(centerX - 1, centerY + 3, 1) = 219: battleScreen(centerX - 1, centerY + 3, 2) = 0
battleScreen(centerX - 0, centerY + 3, 1) = 219: battleScreen(centerX - 0, centerY + 3, 2) = 0
battleScreen(centerX + 0, centerY - 2, 1) = 219: battleScreen(centerX + 0, centerY - 2, 2) = 0
battleScreen(centerX + 1, centerY - 2, 1) = 219: battleScreen(centerX + 1, centerY - 2, 2) = 0
battleScreen(centerX + 2, centerY - 2, 1) = 219: battleScreen(centerX + 2, centerY - 2, 2) = 0
battleScreen(centerX + 1, centerY - 1, 1) = 219: battleScreen(centerX + 1, centerY - 1, 2) = 0
battleScreen(centerX + 2, centerY - 1, 1) = 219: battleScreen(centerX + 2, centerY - 1, 2) = 0
battleScreen(centerX + 3, centerY - 1, 1) = 219: battleScreen(centerX + 3, centerY - 1, 2) = 0
battleScreen(centerX + 1, centerY + 0, 1) = 219: battleScreen(centerX + 1, centerY + 0, 2) = 0
battleScreen(centerX + 2, centerY + 0, 1) = 219: battleScreen(centerX + 2, centerY + 0, 2) = 0
battleScreen(centerX + 3, centerY + 0, 1) = 219: battleScreen(centerX + 3, centerY + 0, 2) = 0
battleScreen(centerX + 4, centerY + 0, 1) = 219: battleScreen(centerX + 4, centerY + 0, 2) = 0
battleScreen(centerX + 1, centerY + 1, 1) = 219: battleScreen(centerX + 1, centerY + 1, 2) = 0
battleScreen(centerX + 2, centerY + 1, 1) = 219: battleScreen(centerX + 2, centerY + 1, 2) = 0
battleScreen(centerX + 3, centerY + 1, 1) = 219: battleScreen(centerX + 3, centerY + 1, 2) = 0
battleScreen(centerX + 0, centerY + 2, 1) = 219: battleScreen(centerX + 0, centerY + 2, 2) = 0
battleScreen(centerX + 1, centerY + 2, 1) = 219: battleScreen(centerX + 1, centerY + 2, 2) = 0
battleScreen(centerX + 2, centerY + 2, 1) = 219: battleScreen(centerX + 2, centerY + 2, 2) = 0
CASE "W"
battleScreen(centerX + 0, centerY - 3, 1) = 219: battleScreen(centerX + 0, centerY - 3, 2) = 0
battleScreen(centerX + 1, centerY - 3, 1) = 219: battleScreen(centerX + 1, centerY - 3, 2) = 0
battleScreen(centerX + 2, centerY - 3, 1) = 219: battleScreen(centerX + 2, centerY - 3, 2) = 0
battleScreen(centerX + 3, centerY - 3, 1) = 219: battleScreen(centerX + 3, centerY - 3, 2) = 0
battleScreen(centerX + 4, centerY - 3, 1) = 219: battleScreen(centerX + 4, centerY - 3, 2) = 0
battleScreen(centerX + 0, centerY + 3, 1) = 219: battleScreen(centerX + 0, centerY + 3, 2) = 0
battleScreen(centerX + 1, centerY + 3, 1) = 219: battleScreen(centerX + 1, centerY + 3, 2) = 0
battleScreen(centerX + 2, centerY + 3, 1) = 219: battleScreen(centerX + 2, centerY + 3, 2) = 0
battleScreen(centerX + 3, centerY + 3, 1) = 219: battleScreen(centerX + 3, centerY + 3, 2) = 0
battleScreen(centerX + 4, centerY + 3, 1) = 219: battleScreen(centerX + 4, centerY + 3, 2) = 0
battleScreen(centerX - 2, centerY - 2, 1) = 219: battleScreen(centerX - 2, centerY - 2, 2) = 0
battleScreen(centerX - 1, centerY - 2, 1) = 219: battleScreen(centerX - 1, centerY - 2, 2) = 0
battleScreen(centerX - 0, centerY - 2, 1) = 219: battleScreen(centerX - 0, centerY - 2, 2) = 0
battleScreen(centerX - 2, centerY + 2, 1) = 219: battleScreen(centerX - 2, centerY + 2, 2) = 0
battleScreen(centerX - 1, centerY + 2, 1) = 219: battleScreen(centerX - 1, centerY + 2, 2) = 0
battleScreen(centerX - 0, centerY + 2, 1) = 219: battleScreen(centerX - 0, centerY + 2, 2) = 0
battleScreen(centerX - 3, centerY - 1, 1) = 219: battleScreen(centerX - 3, centerY - 1, 2) = 0
battleScreen(centerX - 2, centerY - 1, 1) = 219: battleScreen(centerX - 2, centerY - 1, 2) = 0
battleScreen(centerX - 1, centerY - 1, 1) = 219: battleScreen(centerX - 1, centerY - 1, 2) = 0
battleScreen(centerX - 3, centerY + 1, 1) = 219: battleScreen(centerX - 3, centerY + 1, 2) = 0
battleScreen(centerX - 2, centerY + 1, 1) = 219: battleScreen(centerX - 2, centerY + 1, 2) = 0
battleScreen(centerX - 1, centerY + 1, 1) = 219: battleScreen(centerX - 1, centerY + 1, 2) = 0
battleScreen(centerX - 4, centerY + 0, 1) = 219: battleScreen(centerX - 4, centerY + 0, 2) = 0
battleScreen(centerX - 3, centerY + 0, 1) = 219: battleScreen(centerX - 3, centerY + 0, 2) = 0
battleScreen(centerX - 2, centerY + 0, 1) = 219: battleScreen(centerX - 2, centerY + 0, 2) = 0
battleScreen(centerX - 1, centerY + 0, 1) = 219: battleScreen(centerX - 1, centerY + 0, 2) = 0
CASE "S"
battleScreen(centerX - 3, centerY - 4, 1) = 219: battleScreen(centerX - 3, centerY - 4, 2) = 0
battleScreen(centerX - 3, centerY - 3, 1) = 219: battleScreen(centerX - 3, centerY - 3, 2) = 0
battleScreen(centerX - 3, centerY - 2, 1) = 219: battleScreen(centerX - 3, centerY - 2, 2) = 0
battleScreen(centerX - 3, centerY - 1, 1) = 219: battleScreen(centerX - 3, centerY - 1, 2) = 0
battleScreen(centerX - 3, centerY - 0, 1) = 219: battleScreen(centerX - 3, centerY - 0, 2) = 0
battleScreen(centerX + 3, centerY - 4, 1) = 219: battleScreen(centerX + 3, centerY - 4, 2) = 0
battleScreen(centerX + 3, centerY - 3, 1) = 219: battleScreen(centerX + 3, centerY - 3, 2) = 0
battleScreen(centerX + 3, centerY - 2, 1) = 219: battleScreen(centerX + 3, centerY - 2, 2) = 0
battleScreen(centerX + 3, centerY - 1, 1) = 219: battleScreen(centerX + 3, centerY - 1, 2) = 0
battleScreen(centerX + 3, centerY - 0, 1) = 219: battleScreen(centerX + 3, centerY - 0, 2) = 0
battleScreen(centerX - 2, centerY + 0, 1) = 219: battleScreen(centerX - 2, centerY + 0, 2) = 0
battleScreen(centerX - 2, centerY + 1, 1) = 219: battleScreen(centerX - 2, centerY + 1, 2) = 0
battleScreen(centerX - 2, centerY + 2, 1) = 219: battleScreen(centerX - 2, centerY + 2, 2) = 0
battleScreen(centerX + 2, centerY + 0, 1) = 219: battleScreen(centerX + 2, centerY + 0, 2) = 0
battleScreen(centerX + 2, centerY + 1, 1) = 219: battleScreen(centerX + 2, centerY + 1, 2) = 0
battleScreen(centerX + 2, centerY + 2, 1) = 219: battleScreen(centerX + 2, centerY + 2, 2) = 0
battleScreen(centerX - 1, centerY + 1, 1) = 219: battleScreen(centerX - 1, centerY + 1, 2) = 0
battleScreen(centerX - 1, centerY + 2, 1) = 219: battleScreen(centerX - 1, centerY + 2, 2) = 0
battleScreen(centerX - 1, centerY + 3, 1) = 219: battleScreen(centerX - 1, centerY + 3, 2) = 0
battleScreen(centerX + 1, centerY + 1, 1) = 219: battleScreen(centerX + 1, centerY + 1, 2) = 0
battleScreen(centerX + 1, centerY + 2, 1) = 219: battleScreen(centerX + 1, centerY + 2, 2) = 0
battleScreen(centerX + 1, centerY + 3, 1) = 219: battleScreen(centerX + 1, centerY + 3, 2) = 0
battleScreen(centerX + 0, centerY + 1, 1) = 219: battleScreen(centerX + 0, centerY + 1, 2) = 0
battleScreen(centerX + 0, centerY + 2, 1) = 219: battleScreen(centerX + 0, centerY + 2, 2) = 0
battleScreen(centerX + 0, centerY + 3, 1) = 219: battleScreen(centerX + 0, centerY + 3, 2) = 0
battleScreen(centerX + 0, centerY + 4, 1) = 219: battleScreen(centerX + 0, centerY + 4, 2) = 0
CASE "N"
battleScreen(centerX - 3, centerY + 0, 1) = 219: battleScreen(centerX - 3, centerY + 0, 2) = 0
battleScreen(centerX - 3, centerY + 1, 1) = 219: battleScreen(centerX - 3, centerY + 1, 2) = 0
battleScreen(centerX - 3, centerY + 2, 1) = 219: battleScreen(centerX - 3, centerY + 2, 2) = 0
battleScreen(centerX - 3, centerY + 3, 1) = 219: battleScreen(centerX - 3, centerY + 3, 2) = 0
battleScreen(centerX - 3, centerY + 4, 1) = 219: battleScreen(centerX - 3, centerY + 4, 2) = 0
battleScreen(centerX + 3, centerY + 0, 1) = 219: battleScreen(centerX + 3, centerY + 0, 2) = 0
battleScreen(centerX + 3, centerY + 1, 1) = 219: battleScreen(centerX + 3, centerY + 1, 2) = 0
battleScreen(centerX + 3, centerY + 2, 1) = 219: battleScreen(centerX + 3, centerY + 2, 2) = 0
battleScreen(centerX + 3, centerY + 3, 1) = 219: battleScreen(centerX + 3, centerY + 3, 2) = 0
battleScreen(centerX + 3, centerY + 4, 1) = 219: battleScreen(centerX + 3, centerY + 4, 2) = 0
battleScreen(centerX - 2, centerY - 2, 1) = 219: battleScreen(centerX - 2, centerY - 2, 2) = 0
battleScreen(centerX - 2, centerY - 1, 1) = 219: battleScreen(centerX - 2, centerY - 1, 2) = 0
battleScreen(centerX - 2, centerY - 0, 1) = 219: battleScreen(centerX - 2, centerY - 0, 2) = 0
battleScreen(centerX + 2, centerY - 2, 1) = 219: battleScreen(centerX + 2, centerY - 2, 2) = 0
battleScreen(centerX + 2, centerY - 1, 1) = 219: battleScreen(centerX + 2, centerY - 1, 2) = 0
battleScreen(centerX + 2, centerY - 0, 1) = 219: battleScreen(centerX + 2, centerY - 0, 2) = 0
battleScreen(centerX - 1, centerY - 3, 1) = 219: battleScreen(centerX - 1, centerY - 3, 2) = 0
battleScreen(centerX - 1, centerY - 2, 1) = 219: battleScreen(centerX - 1, centerY - 2, 2) = 0
battleScreen(centerX - 1, centerY - 1, 1) = 219: battleScreen(centerX - 1, centerY - 1, 2) = 0
battleScreen(centerX + 1, centerY - 3, 1) = 219: battleScreen(centerX + 1, centerY - 3, 2) = 0
battleScreen(centerX + 1, centerY - 2, 1) = 219: battleScreen(centerX + 1, centerY - 2, 2) = 0
battleScreen(centerX + 1, centerY - 1, 1) = 219: battleScreen(centerX + 1, centerY - 1, 2) = 0
battleScreen(centerX + 0, centerY - 4, 1) = 219: battleScreen(centerX + 0, centerY - 4, 2) = 0
battleScreen(centerX + 0, centerY - 3, 1) = 219: battleScreen(centerX + 0, centerY - 3, 2) = 0
battleScreen(centerX + 0, centerY - 2, 1) = 219: battleScreen(centerX + 0, centerY - 2, 2) = 0
battleScreen(centerX + 0, centerY - 1, 1) = 219: battleScreen(centerX + 0, centerY - 1, 2) = 0
END SELECT
CALL PrintBattleScreen
END SUB