ST Reversi
Kevin Mykytyn, Editorial Programmer
This adaptation of a classic strategy game can be played on any Atari ST system with a color monitor. You can play against a friend or the computer.
"ST Reversi" is a fresh translation of a venerable game known by several different names. Ever since ancient times, strategists have delighted in this game's simple, yet challenging premise. This version is written in ST BASIC and makes good use of the computer's graphics capabilities.
Figure 1: Beginning ScreenObject Of The Game
Type in the program and save a copy before you run it. You can play Reversi in either low or medium resolution. (The display looks best in low resolution.) The playing field consists of a grid of 64 squares (8 × 8). One player's pieces are black, and the other's are white. If you play against the computer, you have the white pieces.
Every game begins with four pieces—two black and two white—placed symmetrically in the middle of the board (see Figure 1). The players alternate turns by placing
Figure 2: Before White's Move Figure 3: After White's Movepieces on the board, and play proceeds until every square is filled or neither player can make a move. In cases where it's impossible to move, you must pass your turn.
The object of the game is to have more pieces on the board than your opponent does at the end of the game. To place a piece on the board, move the mouse pointer to the desired square and click the left button once. If the move is legal, a piece of your color appears in the designated square (the computer beeps if you attempt to make an illegal move).
To take a turn, you must place one of your pieces so that one or more of the opponent's pieces will lie in a straight line between two of yours. When you enclose an opponent's pieces in this way, the enclosed pieces will change from the opponent's color to yours. Your score is equal to the number of pieces you have on the board. The program displays both players' scores at all times and prompts you when it's time to make a move.
Figures 2 and 3 illustrate the effect of placing a piece on the board. In Figure 2, the human player (white) is about to place a piece in the square indicated by the mouse pointer. Figure 3 shows the appearance of the board after that move is made.
Dramatic Reversals
If you're playing against the computer, you may choose two different skill levels. Level 1 is the easier of the two, and it also plays faster. The higher level offers a greater challenge, but requires more time for the computer to calculate each move. Each of the computer's moves takes about 5–10 seconds at level 1 and about 20–50 seconds at level 2. Don't move the pointer while the computer is thinking; ST BASIC slows down when the pointer is in motion.
If you analyze the computer's strategy, you'll discover that it often tries to take the corner squares. The corners are the most valuable positions on the board because they can't be changed to the opposite color. Squares on the edge of the board are also strategically valuable, since they are vulnerable in only one direction.
Of course, there's no single strategy that works every time, particularly if you're playing a human opponent. Beginners often attempt to take the lead early and maintain it throughout the game, but that's not necessarily a winning strategy. When players are evenly matched, it's common for the score to seesaw back and forth several times. Dramatic reversals often occur near the end of the game—hence the name, Reversi. Experienced players try to think ahead and develop a strong strategic position with the final moves in mind.