crap:
PRINT "Error, error line"
beginning:
CONST leftDirection
= 19200 ' to make the code more readable with the left and right arrowkeys CONST rightDirection
= 19712 ' CONST upAndLeft
= 1 'the ball always moves in one diagonal direction CONST theBackground
= 0 ' to determine what the ball hit CONST hitWallSound$
= "O2L30G" CONST hitPaddleSound$
= "O3L30C" CONST hitBrickSound$
= "O3L30G" CONST deathSound$
= "O4L15CO3CO2CO1L10C" CONST successBeep
= "L9O2DL15DL9DL4F" CONST letterE
= 69 'to lengthen / expand the paddle CONST letterS
= 83 'to shrink the paddle CONST letterPlus
= 43 ' score increase CONST letterMinus
= 45 ' score decrease CONST letterStar
= 42 'score multiplier CONST letterB
= 66 ' add second ball
'I share everything so I don't have to worry whether or not I was supposed to pass something. Plus it removes the need to pass the same variable multiple times
FOR initializeArrayX
= 2 TO 79 FOR initializeArrayY
= 2 TO 46 creationBoard(initializeArrayX, initializeArrayY) = 1 'set the board to the background color
DIM SHARED brick
AS coordinate: brick.x
= 2: brick.y
= 2 'start the creation board at 2, 2 DIM SHARED ball
(1 TO 2) AS coordinate
'to track where the ball is on the board DIM SHARED ballDirection
AS INTEGER 'track the ball's direction using the directional constants above DIM SHARED spaceToStart: spaceToStart
= FALSE
'whether or not the spacebar was pushed to begin the level DIM SHARED debugMode
AS INTEGER: debugMode
= FALSE
'to bounce the ball off the bottom or to decrement numberOfGuys DIM SHARED penUp
, currentColor
, eraserOn
AS INTEGER: penUp
= TRUE: currentColor
= 0: eraserOn
= FALSE
DIM SHARED changeBallSomewhat
AS INTEGER: changeBallSomewhat
= 0 'used to move the ball a little bit to avoid never hitting all of the bricks DIM levelChecking
AS INTEGER: levelChecking
= 0 'used in the following loop to check what is the highest level DIM SHARED activeLetter
AS droppingLetter: activeLetter.x
= 0: activeLetter.y
= 0: activeLetter.letter
= 0 levelChecking = levelChecking + 1
lastLevelCreated = levelChecking - 1
printTheMenu = TRUE 'used to stop the menu from flickering
PRINT CenterText$
("Menu") PRINT CenterText$
("------") PRINT CenterText$
("1.) Instructions") PRINT CenterText$
("2.) Create A Level") PRINT CenterText$
("3.) Play The Game") PRINT CenterText$
("4.) Exit") printTheMenu = FALSE
printTheMenu = TRUE
printTheMenu = TRUE
printTheMenu = TRUE
PRINT CenterText$
("Level Creator") PRINT CenterText$
("---------------")
PRINT CenterText$
("The available commands are listed at the bottom of the screen.") PRINT CenterText$
("When the pen is up, the cursor moves without adding to the level") PRINT CenterText$
("being created. When the pen is down the current brick is added") PRINT CenterText$
("to the level being created. The other commands are self explanatory.") PRINT CenterText$
("If no levels have been created, the default level is used.") PRINT CenterText$
("If you progress beyond all levels created, the last level created repeats.") PRINT CenterText$
("Game") PRINT CenterText$
("------")
PRINT CenterText$
("The object of the game is to progress to the next level by") PRINT CenterText$
("destroying all of the bricks. To do this you must position the") PRINT CenterText$
("under the ball so that it is reflected toward the bricks using") PRINT CenterText$
("the left and right arrow keys.") LOCATE , 2:
PRINT "[ESC] to return to the main menu * = Score multiplier (-1, 1.5 or 2)":
PRINT PRINT CenterText$
("Push C to turn on debug mode and O to turn it off.") PRINT CenterText$
("Push any key to continue.")
returnString$
= SPACE$(INT((80 - LEN(thisString$
)) / 2)) + thisString$
CenterText$ = returnString$
SUB PrintBrick
(x
, y
, onOrOff
) useColor = board(x, y, 2) 'print the brick instead of erasing it, pick up the color there
useColor = 1
board(x + across, y, 1) = 219
board(x + across, y, 2) = useColor
IF onOrOff
= FALSE
THEN 'brick is destroyed numberOfBricks = numberOfBricks - 1
score = score + 5
chanceOfLetter
= INT(RND * 100) + 1 IF chanceOfLetter
<= 25 AND activeLetter.letter
= 0 THEN ' 25% chance of bonus pickingLetter
= INT(RND * 6) + 1 'choose which bonus to activate activeLetter.letter = letterE
activeLetter.letter = letterS
activeLetter.letter = letterPlus
activeLetter.letter = letterMinus
activeLetter.letter = letterStar
activeLetter.letter = letterB ' make 2 balls active
activeLetter.x = x + 3 'place the falling letter near the center of destroyed brick
activeLetter.y = y + 1
SUB PrintLetter
(onOrOff
) IF INT(activeLetter.y
) < 47 THEN 'whether the bonus letter is done falling IF onOrOff
= TRUE
THEN 'display the bonus letter clr = 9
clr = 1 'remove bonus letter from display
CALL PlaceChar
(activeLetter.x
, activeLetter.y
, activeLetter.letter
, clr
) 'put the letter on the board ELSEIF activeLetter.y
>= 47 THEN 'activate the letter or ignore it IF paddleLeft
<= activeLetter.x
AND activeLetter.x
<= paddleLeft
+ paddleLength
- 1 THEN 'letter was caught SELECT CASE activeLetter.letter
'which letter to activate CASE letterE
'lengthen the paddle IF paddleLength
<= 10 THEN paddleLength
= paddleLength
+ 2 CASE letterS
'shrink the paddle paddleLength = paddleLength - 2
paddleLength = paddleLength - 1
CASE letterPlus
'increase score score = score + 15
CASE letterMinus
' decrease score score = score - 15
CASE letterStar
'multiply the score multiplier = -1
multiplier = 1.5
score
= INT(score
* multiplier
) CASE letterB
'initiate second ball secondBall = TRUE
'2 balls running already, nothing to do
ball(2).x = activeLetter.x 'start the second ball from the place where "B" was caught
ball(2).y = activeLetter.y
IF ballDirection
= upAndLeft
THEN 'ball(1) is moving diagonally up and right ball2Direction = upAndRight ' send ball 2 in the opposite direction
ball2Direction = upAndRight
ball2Direction = upAndRight
ball2Direction = upAndLeft
END IF ' ball(2) has been given a direction ball(1).x = activeLetter.x
ball(1).y = activeLetter.y
IF ball2Direction
= upAndLeft
THEN ballDirection = upAndRight
ballDirection = upAndLeft
ballDirection = upAndRight
ballDirection = upAndLeft
END IF 'ball(1) has been given a direction END IF 'ball(1) and ball(2) are active END SELECT 'action has been done with selected bonus letter END IF ' the letter has finished being caught activeLetter.x = 0: activeLetter.y = 0: activeLetter.letter = 0 'the letter is no longer active
FOR x
= 1 TO 80:
FOR y
= 1 TO 48 'make the board blue board(x, y, 1) = 219 ' ASCII code of board space
board(x, y, 2) = 1 ' color of board space
'print left, right and top borders
CALL PlaceChar
(1, y
, 219, 12) ' put the position, ASCII code and color on the board to make the left border CALL PlaceChar
(80, y
, 219, 12) ' same to make the left border on the board CALL PlaceChar
(x
, 1, 219, 12) ' put the top border on the board paddleLeft
= INT(RND * (72 - 2 + 1)) + 2 paddleLength = 8
CALL PrintPaddle
(TRUE
) ' put the paddle on the board with the left at x coordinate 36 ball(1).x = paddleLeft + 4: ball(1).y = 47 ' position the ball/moving ball
CALL PrintBall
(TRUE
) ' put the ball on the board ballDirection
= INT(RND * 2) + 1 'randomize the starting direction of the ball as up and left or up and right
filename$ = "Level " + S$(currentLevel)
OPEN filename$
FOR INPUT AS #1 'open the file with the level information FOR xCounting
= 2 TO 79 ' x coordinate of the board FOR yCounting
= 2 TO 46 ' y coordinate of the board INPUT #1, boardColor$
' get the color of the board at xCounting, yCounting board
(xCounting
, yCounting
, 2) = VAL(boardColor$
) 'color the board at xCounting, yCounting ' LOCATE 20, 20: COLOR 15, 0: PRINT "Filename: " + filename$: CALL P
ELSE ' if no levels were created CALL PlaceChar
(x
, 2, 219, 14) 'put a yellow (14) block (219) at x, y on the board CALL PlaceChar
(x
, 4, 219, 14) CALL PlaceChar
(x
, 6, 219, 14) lastLevelCreated = 1
numberOfBricks = 0 ' after a level has been put on the board, count the number of bricks on it
' CALL PrintBoard 'debugging why the numberOfBricks is sometimes wrong
' LOCATE 15, 2
' COLOR 15, 0
' PRINT "2345678901234567890123456789012345678901234567890123456789012345678901234567890"
' LOCATE 14, 2
' PRINT " 1 2 3 4 5 6 7 8"
' COLOR 10, 0
' FOR thirteen = 2 TO 13
' LOCATE thirteen, 1
' PRINT S$(thirteen)
' NEXT
FOR brickCountingY
= 2 TO 46 'with this set to 47 the ball was being counted as a brick sometimes FOR brickCountingX
= 2 TO 79 STEP 6 'each brick is 6 blocks long IF board
(brickCountingX
, brickCountingY
, 2) <> 1 THEN numberOfBricks = numberOfBricks + 1
' LOCATE 46, 1
' COLOR 15, 0
' PRINT "board(" + S$(brickCountingX) + ", " + S$(brickCountingY) + ", 2): " + S$(board(brickCountingX, brickCountingY, 2))
' PRINT "numberOfBricks = " + S$(numberOfBricks)
' CALL P(TRUE)
CALL PrintBoard
'print the board to the screen spaceToStart = FALSE 'spacebar has yet to be puched to start the current level
CALL PrintLevel
'put the current level on the board and print it out printOutBoard = FALSE ' to avoid flicker of the board being constantly printed, the need to print it is false
delaySpeed = 0.029 'delay to use inside the main DO-LOOP
secondBall = FALSE
' LOCATE 48, 1: PRINT "Level " + S$(currentLevel)
debugging$
= INKEY$ 'using strings instead of _KEYDOWN(code) is easier. i initially added INKEY$ for debugging IF spaceToStart
= TRUE
THEN ' the spacebar has been hit to start the game IF secondBall
= FALSE
THEN 'there is only one ball active IF ball
(1).x
<> 0 THEN 'find out if ball(1) is active CALL PrintBall
(FALSE
) 'remove the ball from the board CALL MoveBall
'move the ball in the current direction CALL PrintBall
(TRUE
) 'put the ball on the board at the new position ELSEIF ball
(2).x
<> 0 THEN 'find out if ball(2) is active PRINT "Where is the error causing a return to the menu?" ELSEIF secondBall
= TRUE
THEN 'there are 2 active balls CALL PrintBall
(FALSE
) 'remove ball(1) from the display CALL PrintBall2
(FALSE
) ' remove ball(2) from display CALL MoveBall
' move ball(1) CALL MoveBall2
'move ball(2) CALL PrintBall
(TRUE
) 'redisplay ball(1) CALL PrintBall2
(TRUE
) ' redisplay ball(2) PRINT "Where is the error causing an exit from this DO?" IF _KEYDOWN(leftDirection
) = -1 THEN 'the left arrow key had been pushed CALL PrintPaddle
(FALSE
) ' remove the paddle from the board paddleLeft = paddleLeft - 1.5 ' move the paddle leftward
CALL PrintPaddle
(TRUE
) ' put the paddle on the board at the new position printOutBoard = TRUE 'it is now needed to print the board to the screen
paddleLeft = paddleLeft + 1.5
printOutBoard = TRUE
IF printOutBoard
= TRUE
THEN 'print the board to the screen CALL PrintBoard
' print the board to the screen printOutBoard = FALSE 'stop the board from being printed now
IF numberOfBricks
= 0 THEN 'there are no bricks left on the board currentLevel = currentLevel + 1 'increment the current level
activeLetter.letter = 0: activeLetter.x = 0: activeLetter.y = 0
CALL PrintLevel
'put the newest level on the board spaceToStart = FALSE 'the spacebar has not been pressed since the new level has been output
score = score + 200 '200 points for finishing a level
IF mute
= -1 THEN PLAY successBeep
'1 is mute, -1 is note muted IF activeLetter.letter
<> 0 THEN activeLetter.y = activeLetter.y + 0.5
printOutBoard = TRUE
IF debugging$
= "C" THEN debugMode
= TRUE
IF debugging$
= "O" THEN debugMode
= FALSE
spaceToStart = TRUE ' the spacebar has been pushed
printOutBoard = TRUE ' it is needed to print the board to the screen
_DELAY (delaySpeed
) ' insert a delay to make the movement playable and visible IF score
MOD 750 = 0 AND score
<> 0 THEN numberOfGuys
= numberOfGuys
+ 1 ' new guy every 2,000 points IF debugging$
= "+" THEN 'increase the game speed delaySpeed = delaySpeed - 0.01
IF delaySpeed
< 0 THEN delaySpeed
= 0 'don't allow a negative delay IF debugging$
= "-" THEN delaySpeed
= delaySpeed
+ 0.005 'decrease the game speed IF debugging$
= "m" OR debugging$
= "M" THEN mute
= mute
* -1 'turn mute on or off IF debugging$
= "p" OR debugging$
= "P" THEN pause$
= INPUT$(1) 'pause the game
changeBallSomewhat = changeBallSomewhat + 1 'keep track of the number of times the ball has moved to occasionally nudge it
changeBall2Somewhat = changeBall2Somewhat + 1 'keep track of the number of times the ball has moved to occasionally nudge it
FUNCTION Report
(x
, y
) 'determine what element is at specified x, y location 'if color 12 then border, 1 then background, 15 then paddle, 11 ball, 9 bonus, else brick
rtn = -1 'initialize what should be returned
rtn = theWall
rtn = theBackground
rtn = thePaddle
rtn = theBall
rtn = theBonus
rtn = theBrick
Report = rtn
SELECT CASE Report
(ball
(1).x
+ 1, ball
(1).y
- 1) 'report one away from where the ball currently is CASE theBackground
, theBall
' move it even if both balls are in the same place ball(1).x = ball(1).x + 1
ball(1).y = ball(1).y - 1
IF changeBallSomewhat
MOD 100 = 0 AND ball
(1).x
+ 1 < 80 THEN ball
(1).x
= ball
(1).x
+ 1 'hit the right wall
ballDirection = upAndLeft
'hit top wall
ballDirection = downAndRight
leftSideOfBrick = FindBrickLeft(ball(1).x + 1)
vertOfBrick = FindBrickVertical(ball(1).y - 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ballDirection = downAndRight
SELECT CASE Report
(ball
(2).x
+ 1, ball
(2).y
- 1) 'report one away from where the ball currently is CASE theBackground
, theBall
' move it even if both balls are in the same place ball(2).x = ball(2).x + 1
ball(2).y = ball(2).y - 1
IF changeBall2Somewhat
MOD 100 = 0 AND ball
(2).x
+ 1 < 80 THEN ball
(2).x
= ball
(2).x
+ 1 'hit the right wall
ball2Direction = upAndLeft
'hit top wall
ball2Direction = downAndRight
leftSideOfBrick = FindBrickLeft(ball(2).x + 1)
vertOfBrick = FindBrickVertical(ball(2).y - 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ball2Direction = downAndRight
CASE theBackground
, theBall
ball(1).x = ball(1).x - 1
ball(1).y = ball(1).y - 1
IF changeBallSomewhat
MOD 100 = 0 AND ball
(1).x
- 1 > 1 THEN ball
(1).x
= ball
(1).x
- 1 ballDirection = upAndRight
ballDirection = downAndLeft
leftSideOfBrick = FindBrickLeft(ball(1).x - 1)
vertOfBrick = FindBrickVertical(ball(1).y - 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ballDirection = downAndLeft
CASE theBackground
, theBall
ball(2).x = ball(2).x - 1
ball(2).y = ball(2).y - 1
IF changeBall2Somewhat
MOD 100 = 0 AND ball
(2).x
- 1 > 1 THEN ball
(2).x
= ball
(2).x
- 1 ball2Direction = upAndRight
ball2Direction = downAndLeft
leftSideOfBrick = FindBrickLeft(ball(1).x - 1)
vertOfBrick = FindBrickVertical(ball(1).y - 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ball2Direction = downAndLeft
CASE theBackground
, theBall
manDied = TRUE
score = score - 50
spaceToStart = FALSE
paddleLength = 8
paddleLeft
= INT(RND * (72 - 2 + 1)) + 2 ball(1).x = paddleLeft + 4: ball(1).y = 47
ballDirection
= INT(RND * 2) + 1 numberOfGuys = numberOfGuys - 1
ELSE 'second ball is true but just fell below the board secondBall = FALSE
ball(1).x = 0
ball(1).y = 0
ELSE 'debug mode is on (true) ballDirection = upAndRight
ball(1).x = ball(1).x + 1
ball(1).y = ball(1).y - 1
IF changeBallSomewhat
MOD 100 = 0 AND ball
(1).x
+ 1 < 80 THEN ball
(1).x
= ball
(1).x
+ 1 ball(1).x = ball(1).x + 1
ball(1).y = ball(1).y + 1
IF ball
(1).x
+ 1 = 80 THEN ballDirection
= downAndLeft
leftSideOfBrick = FindBrickLeft(ball(1).x + 1)
vertOfBrick = FindBrickVertical(ball(1).y + 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ballDirection = upAndRight
ballDirection = upAndRight
CASE theBackground
, theBall
manDied = TRUE
score = score - 50
spaceToStart = FALSE
paddleLength = 8
paddleLeft
= INT(RND * (72 - 2 + 1)) + 2 ball(1).x = paddleLeft + 4: ball(1).y = 47
ball(2).x = 0: ball(2).y = 0
ballDirection
= INT(RND * 2) + 1 numberOfGuys = numberOfGuys - 1
ELSE 'second ball is ... was true secondBall = FALSE
ball(2).x = 0
ball(2).y = 0
ball2Direction = upAndRight
ball(2).x = ball(2).x + 1
ball(2).y = ball(2).y - 1
IF changeBall2Somewhat
MOD 100 = 0 AND ball
(2).x
+ 1 < 80 THEN ball
(2).x
= ball
(2).x
+ 1 ball(2).x = ball(2).x + 1
ball(2).y = ball(2).y + 1
IF ball
(2).x
+ 1 = 80 THEN ball2Direction
= downAndLeft
leftSideOfBrick = FindBrickLeft(ball(2).x + 1)
vertOfBrick = FindBrickVertical(ball(2).y + 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ball2Direction = upAndRight
ball2Direction = upAndRight
manDied = TRUE
score = score - 50
spaceToStart = FALSE
paddleLeft
= INT(RND * (72 - 2%
+ 1)) + 2 paddleLength = 8
ball(1).x = paddleLeft + 4: ball(1).y = 47
ballDirection
= INT(RND * 2) + 1 numberOfGuys = numberOfGuys - 1
ELSE 'second ball was true secondBall = FALSE
ball(1).x = 0
ball(1).y = 0
ballDirection = upAndLeft
ball(1).x = ball(1).x - 1
ball(1).y = ball(1).y - 1
IF changeBallSomewhat
MOD 100 = 0 AND ball
(1).x
- 1 > 1 THEN ball
(1).x
= ball
(1).x
+ 1 ball(1).x = ball(1).x - 1
ball(1).y = ball(1).y + 1
IF ball
(1).x
- 1 = 1 THEN ballDirection
= downAndRight
leftSideOfBrick = FindBrickLeft(ball(1).x - 1)
vertOfBrick = FindBrickVertical(ball(1).y + 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ballDirection = upAndLeft
ballDirection = upAndLeft
PRINT "Error in moving the ball in specified direction":
CALL P
(TRUE
)
CASE theBackground
, theBall
manDied = TRUE
score = score - 50
spaceToStart = FALSE
paddleLength = 8
paddleLeft
= INT(RND * (72 - 2 + 1)) + 2 ball(1).x = paddleLeft + 4: ball(1).y = 47
ball(2).x = 0: ball(2).y = 0
ballDirection
= INT(RND * 2) + 1 numberOfGuys = numberOfGuys - 1
ELSE 'second ball is ... was true secondBall = FALSE
ball(2).x = 0
ball(2).y = 0
ball2Direction = upAndLeft
ball(2).x = ball(2).x - 1
ball(2).y = ball(2).y - 1
IF changeBall2Somewhat
MOD 100 = 0 AND ball
(2).x
+ 1 < 80 THEN ball
(2).x
= ball
(2).x
+ 1 ball(2).x = ball(2).x - 1
ball(2).y = ball(2).y + 1
IF ball
(2).x
- 1 = 1 THEN ball2Direction
= downAndRight
leftSideOfBrick = FindBrickLeft(ball(2).x - 1)
vertOfBrick = FindBrickVertical(ball(2).y + 1)
CALL PrintBrick
(leftSideOfBrick
, vertOfBrick
, FALSE
) ball2Direction = upAndLeft
ball2Direction = upAndLeft
FUNCTION FindBrickLeft
(x
) 'this returns the x coordinate of the brick that was hit rtn = 0
FindBrickLeft = rtn
rtn = 0
FindBrickVertical = rtn
SUB PrintBall
(onOrOff
) 'put the ball on the board or remove it from the board to effect position change useColor = 11
useColor = 1
CALL PlaceChar
(ball
(1).x
, ball
(1).y
, 254, useColor
)
useColor = 11
useColor = 1
CALL PlaceChar
(ball
(2).x
, ball
(2).y
, 254, useColor
)
SUB PrintPaddle
(onOrOff
) theColor = 15
theColor = 1
IF paddleLeft
< 2 THEN paddleLeft
= 2 IF paddleLeft
> 80 - paddleLength
THEN paddleLeft
= 80 - paddleLength
FOR across
= 0 TO paddleLength
- 1 CALL PlaceChar
(INT(paddleLeft
) + across
, 48, 219, theColor
)
SUB PlaceChar
(X
, Y
, char
, clr
) 'put the character ASCII with specified color on the board board(X, Y, 1) = char 'character
board(X, Y, 2) = clr ' color
SUB PrintBoard
'print the current board configurationg to the screen and update the current stats displayed this$
= CHR$(board
(x
, y
, 1)) theColor = board(x, y, 2)
IF BrickIsThere
(x
, y
) = TRUE
THEN xCo = FindBrickLeft(x)
yCo = FindBrickVertical(y)
CALL PrintBrick
(xCo
, yCo
, TRUE
) PRINT " Level " + S$
(currentLevel
) + " ";
PRINT "Men: " + S$
(numberOfGuys
) + " ";
PRINT "Bricks remaining: " + S$
(numberOfBricks
) + " ";
PRINT "Score: " + S$
(score
) + " "
x = xCoord: y = yCoord
rtn = FALSE
IF board
(x
, y
, 2) <> 11 AND board
(x
, y
, 2) <> 15 AND board
(x
, y
, 2) <> 12 AND board
(x
, y
, 2) <> 9 AND board
(x
, y
, 2) <> 1 THEN rtn
= TRUE
BrickIsThere = rtn
SUB CreationMain
'main subroutine for the level creation feature penUp = TRUE
eraserOn = FALSE
currentColor = 0
brick.x = 2
brick.y = 2
creationBoard(countX, countY) = 1
printOutCurrentBoard = FALSE
penUp = FALSE
penUp = TRUE
printOutCurrentBoard = TRUE
eraserOn = TRUE
currentColor = 1
penUp = FALSE
eraserOn = FALSE
currentColor = 0
penUp = TRUE
printOutCurrentBoard = TRUE
CASE "C", "c" 'game uses 12, 15, 11, 1 and 9, 17 currentColor = 2
currentColor = 10
currentColor = 13
currentColor = 16
currentColor = 18
currentColor = currentColor + 1
currentColor = 0
printOutCurrentBoard = TRUE
penUp = TRUE
eraserOn = FALSE
currentColor = 0
creationBoard(xCount, yCount) = 1
printOutCurrentBoard = TRUE
brick.y = brick.y - 1
printOutCurrentBoard = TRUE
brick.x = brick.x - 6
printOutCurrentBoard = TRUE
brick.y = brick.y + 1
printOutCurrentBoard = TRUE
brick.x = brick.x + 6
printOutCurrentBoard = TRUE
IF printOutCurrentBoard
= TRUE
THEN printOutCurrentBoard = FALSE
highestLevel = 0
highestLevel = highestLevel + 1
filename$ = "Level " + S$(highestLevel)
PRINT "The game board has been saved as " + CHR$(34) + "Level " + S$
(highestLevel
) + CHR$(34) PRINT "It will automatically be loaded after Level " + S$
(highestLevel
- 1) + " is completed." stringOut$ = S$(creationBoard(x, y))
IF LEN(stringOut$
) = 1 THEN stringOut$
= " " + stringOut$
a$
= "Push " + CHR$(34) + "A" + CHR$(34) + " to make (a)nother level" SaveBoard$ = "END"
creationBoard(brick.x + counting, brick.y) = currentColor
LOCATE brick.y
, brick.x
+ count
COLOR creationBoard
(x
, y
), 1
PRINT "Use the Arrow Keys To Move P - Pen ";
'LOCATE 20, 20: COLOR 15, 0: PRINT "eraserOn = " + S$(eraserOn): CALL P
' LOCATE 48, 26
PRINT " S - Save [ESC] - End Without Save" ' LOCATE 45, 10: COLOR 10, 1: PRINT "eraserOn = " + S$(eraserOn)