A checkers type game

John Sinclair, Salt Lake City, UT

Here's a fast, fun, text-based game for one or two players. Letters play against numbers in a lively grid-type competition. There are no special graphics, but they will not be missed as you race your competitor across the board for a win. If you want to go solo, your computer will play against you with fierce determination.

Criss-Cross can be as simple as the youngest child playing, but there is room to develop some serious strategy. At the start, the players determine the size of the grid and which pieces each will move. Enter the piece to move with a keyboard input and the direction to move with one of the four arrow keys. Game rules will not allow diagonal moves or jumps. Don't block your opponent so he cannot move at all or you will lose by default!

If a player is blocked out, or thinks he has been, he should just strike the spacebar. The program will scan the current player's pieces and if there is no legal move left to the player, the game goes to him. However, if there are moves left, the piece will be highlighted and play may continue by again striking the spacebar.

Since the game loads in more than the memory available at power up, you will need to do a "PCLEAR 1" then a "CLOAD" and "RUN". Otherwise, the out-of-memory error will pop up.

The range of five to seven pieces in play is a better game when opposing the computer. Three to five pieces are quick and challenging. The bit grids are slow for the computer to play since it has to sift all its pieces to find priority moves. Human players will enjoy competing on any size game board.

Behind the Program

First in the program, we jump to the title page and instructions in lines 3100 on. Then we go back to the start of the main program loop (line 750) to gather three inputs. The computer finds out if it will be a competitor when the number of players are entered. Next, you tell it how many pieces each side will be using. Finally, you tell it who will move first. When going against the computer, the human player will always have the first move and his choice of letters or numbers for game pieces.

The program builds a three-dimensional array in lines 920-1220. The first level holds the pieces in play and the second level holds the screen's "PRINT @" positions. Each time a move is entered, the piece is sifted out of the array by the subroutine at line 180. After each completed move, both home areas are checked. If either is full then a winner is announced and a new game is offered.

Subroutines are placed at the beginning of the program to cut down program time used to search for them. Instructions used only once or seldom are toward the end of the program. ■

lean provide copies for readers who do not want to type the program in (Color computer only). Please do not send a cassette as I use Microsette Data Tapes for reliability. I mail first class promptly for a $4.00 fee. John Sinclair, 1234 Alameda Ave. #1, Salt Lake City, UT 84102.

1340 if nm$=n$ then 1370 1350 if p<65 or p>64+pp then sou nd 69,3:goto 1310 1360 goto 1380

1370 if p<49 or p>48+pp then 131 0

1380 prints 52,p$

1390 sound 240,1

1400 gosub 180

1410 if z=p then 1430

1420 sound 69,3:prints 52," ";:g oto 1310

1430 prints) 72, "direction 1" 1440 sound 150,2

1460 d=asccd$)

1470 if d=32 then 2700

1480 if nm$=n$ then 1510

1490 if d=10 then sound 69,3:got

0 0

Post a comment