<p>startover: SCREEN 10</p> <p>CLS PRINT "What is the name of player 1?" INPUT player1.name$ PRINT "What is the name of player 2?" INPUT player2.name$ PRINT "How many rounds do you want to play?" INPUT round.total player1.score = 0 player2.score = 0 rounds = 0</p> <p>new: rounds = rounds + 1</p> <p>'draw the field SCREEN 7 CLS PAINT (5, 5), (2) LINE (0, 0)-(3, 199), 0, BF LINE (0, 199)-(319, 194), 0, BF LINE (318, 199)-(314, 0), 0, BF PAINT (1, 1), (15), (2) LINE (0, 0)-(0, 200), 0 LINE (1, 74)-(3, 144), 0, BF LINE (314, 74)-(319, 144), 0, BF LINE (1, 0)-(319, 20), 15, BF LINE (0, 0)-(320, 15), 0, BF LINE (317, 0)-(319, 199), 0, BF LOCATE 1, 1 IF player1.score > player2.score THEN COLOR 9 ELSE COLOR 12 END IF</p> <p>IF player1.score = player2.score THEN COLOR 15 END IF</p> <p>PRINT "Score:"; " "; player2.name$; ":"; player2.score; " "; player1.name$; ":"; player1.score</p> <p>IF rounds > round.total THEN GOTO quit END IF</p> <p>player1.x = 300 player1.y = 95 player2.x = 12 player2.y = 95 player1.move$ = "n" player2.move$ = "n" ball.x = 163 ball.y = 3 <em> INT(55 </em> RND) + 26</p> <p>x = INT(2 * RND) IF x = 1 THEN ball.ns = 3 ELSE ball.ns = -3 END IF</p> <p>x = INT(2 * RND) IF x = 1 THEN ball.ew = 3 ELSE ball.ew = -3 END IF</p> <p>ball.x.2 = ball.x ball.y.2 = ball.y player1.x.2 = player1.x player1.y.2 = player1.y player2.x.2 = player2.x player2.y.2 = player2.y</p> <p>player1.ns = 0 player1.ew = 0 player2.ns = 0 player2.ew = 0</p> <p>a: CIRCLE (ball.x.2, ball.y.2), 6, 2 PAINT (ball.x.2, ball.y.2), (2), (2)</p> <p>LINE (player1.x.2, player1.y.2 + 1)-(player1.x.2 + 6, player1.y.2 + 23), 2, BF LINE (player2.x.2, player2.y.2 + 1)-(player2.x.2 + 6, player2.y.2 + 23), 2, BF</p> <p>LINE (player1.x, player1.y + 1)-(player1.x + 6, player1.y + 23), 9, BF LINE (player2.x, player2.y + 1)-(player2.x + 6, player2.y + 23), 12, BF CIRCLE (ball.x, ball.y), 6, 14 PAINT (ball.x, ball.y), (14), (14)</p> <p>FOR count = 1 TO Flicker.Control NEXT count</p> <p>ball.x.2 = ball.x ball.y.2 = ball.y player1.x.2 = player1.x player1.y.2 = player1.y player2.x.2 = player2.x player2.y.2 = player2.y</p> <p>ball.x = ball.x + ball.ew ball.y = ball.y + ball.ns player1.x = player1.x + player1.ew player1.y = player1.y + player1.ns player2.x = player2.x + player2.ew player2.y = player2.y + player2.ns</p> <p>IF ball.x - 6 <= 6 AND ball.y >= 74 AND ball.y <= 144 THEN GOTO goal.1 END IF</p> <p>IF ball.x + 6 >= 312 AND ball.y >= 74 AND ball.y <= 144 THEN GOTO goal.2 END IF</p> <p>IF ball.y - 6 <= 20 THEN ball.ns = 3 END IF</p> <p>IF ball.y + 6 >= 194 THEN ball.ns = -3 END IF</p> <p>IF ball.x - 6 <= 6 THEN ball.ew = 3 END IF</p> <p>IF ball.x + 6 >= 312 THEN ball.ew = -3 END IF</p> <p>IF ball.x + 6 >= player1.x AND ball.x - 6 <= player1.x + 6 AND ball.y >= player1.y AND ball.y <= player1.y + 24 THEN ball.ew = -ball.ew IF noise = 1 THEN BEEP END IF END IF</p> <p>IF ball.x + 6 >= player2.x AND ball.x - 6 <= player2.x + 6 AND ball.y >= player2.y AND ball.y <= player2.y + 24 THEN ball.ew = -ball.ew IF noise = 1 THEN BEEP END IF END IF</p> <p>IF player1.y <= 20 THEN player1.ns = 3 END IF</p> <p>IF player1.y + 24 >= 194 THEN player1.ns = -3 END IF</p> <p>IF player1.x <= 6 THEN player1.ew = 3 END IF</p> <p>IF player1.x + 6 >= 312 THEN player1.ew = -3 END IF</p> <p>IF player2.y <= 20 THEN player2.ns = 3 END IF</p> <p>IF player2.y + 24 >= 194 THEN player2.ns = -3 END IF</p> <p>IF player2.x <= 6 THEN player2.ew = 3 END IF</p> <p>IF player2.x + 6 >= 312 THEN player2.ew = -3 END IF</p> <p>move$ = INKEY$ SELECT CASE move$</p> <p>CASE "p" LOCATE 12, 3 COLOR 15 PRINT "Game Paused, Hit Space to Continue" WHILE INKEY$ <> " " WEND LINE (10, 44)-(310, 144), 2, BF</p> <p>CASE "q" GOTO quit</p> <p>'player1 change in movement CASE "8" player1.ns = -3</p> <p>CASE "6" player1.ew = 3</p> <p>CASE "2" player1.ns = 3</p> <p>CASE "4" player1.ew = -3</p> <p>CASE "5" player1.ew = 0 player1.ns = 0</p> <p>'player2 change in movement CASE "i" player2.ns = -3</p> <p>CASE "l" player2.ew = 3</p> <p>CASE "," player2.ns = 3</p> <p>CASE "m" player2.ns = 3</p> <p>CASE "j" player2.ew = -3</p> <p>CASE "k" player2.ew = 0 player2.ns = 0</p> <p>END SELECT</p> <p>GOTO a</p> <p>goal.1: LOCATE 14, 2 COLOR 9 PRINT "Goal!" player1.score = player1.score + 1 WHILE INKEY$ <> " " WEND GOTO new</p> <p>goal.2: COLOR 4 LOCATE 14, 35 PRINT "Goal!" player2.score = player2.score + 1 WHILE INKEY$ <> " " WEND GOTO new</p> <p>quit: LOCATE 12, 6 COLOR 4 PRINT " Game Over " LOCATE 13, 6 PRINT "Do you want to play again? y/n" DO y.n$ = INKEY$ LOOP UNTIL y.n$ = "y" OR y.n$ = "n" IF y.n$ = "y" THEN GOTO startover END IF</p>