General Description
This is a variation on noughts and crosses for two players. Player one has red blocks, player two yellow. When the program is run a grid appears on the screen, and the idea is to drop one of your blocks into the grid using the cursor control keys to move, and the Return key to drop the block. The object of the game is for a player to produce a line of four blocks in any direction - vertically, horizontally or diagonally.
Detailed Description
Lines 1-2 First part of delete block.
10-50 Set up variables and sound.
60 Disable cursor control keys.
70-120 Draw grid.
130-140 Go to procedures to get input from keyboard and check for line.
150-210 If line has been made then say who has won.
220-280 Procedure to display block on screen.
CL = colour of block.
290-320 Procedure to get input from keyboard.
If player 1 has just moved then new player = player 2 and vice-versa. Put block at starting position.
330-420 Display player on screen and get input from keyboard.
430-490 Move block across screen.
500-620 Drop block down the grid and store the position where it rests in B(r,c) r = row c = column.
End procedure.
630-1000 Procedure to check for a line.
Line 640-700 check for horizontal line.
Line 710-770 check for vertical line.
Line 780-870 check for / line.
Line 880-960 check for \ line.
Line 970-990 check to see if top column is full, if so then set E = draw.
1010-1210 Instructions.
1220-1250 Second part of delete trick.
1260-1300 Credits.
Educational Notes
Whilst this program has a certain value as a logic exercise, it has been designed primarily as entertainment.