Im Magazin „8000 PLUS" wurde im September 1990 der folgende Artikel abgedruckt.
Das bekannte Spiel Othello als BASIC-Programm

Othello.bas


The ancient game of "go" is credited with the same prestige in Japanese culture as the game of chess in our own. The two are comparable in terms of both intricacy and skill: however, the Japanese game, in typically ascetic fashion, is based purely on ihe use of black and white counters.
From these illustrious roots, came the simplified European version of the game, which was called Othello. It also relies on the use of black and white counters, and the principles of the game are the same. Few people manage to reach the heights of intellectual challenge with "Othello", but it is nonetheless a hugely popular game.
Richard Hopkins has come up with a PCW version of Othello. Exactly how much Eastern knowledge can be captured in 88 lines of Mallard BASIC is debatable, but the program certainly appears to put up a game struggle against newcomers.
The PCW challenges you to a game of skill and strategy in the program othello.bas
To play, the program first asks you to choose your level of skill. The screen goes blank for a short time while the computer prepares the board. There are, to begin with, only four counters. You are the while player (portrayed as hollow pieces on the screen), and the computer has the black counters.
You choose where to put your counter by entering two digits, firstly the vertical reference, then the horizontal. Any attempt to enter an impossible move, will cause your opponent, the computer, to respond with a belligerent bleep.
The aim of the game is to have as many of your counters on the board as possible. Any of your opponent's counters, caught between your counters and the one you have just played, become yours. The PCW takes its time over choosing its own moves, no doubt pondering over a myriad of possibilities.
The winner is the player with the highest number of counters at the end of the game. This is either when the board is full, or when no more moves are possible.
A few refinements, for those of you with the time and inclination, would make this into a very polished program. The most obvious addition would be to add a continuous score-keeper, and a few lines to print a message when you reach the end of a game.

The program is set up in lines 10 to 40. The program then prompts the user to enter the level of play and the board is drawn. Line 80 is the main program loop.
Lines 90 to 180 consist of a subroutine which assigns values to the board. This subroutine is called in line 70 ot the main program.
The subroutine at line 190 starts by allowing the player to enter a move. The subroutine is called during the main program loop on line 80.
This part ot the subroutine checks to see if a move is valid, and is used to check either the computer's or player's move.
The computer finds its best move in this part of the program, using the previous subroutine to check whether a move is valid or not.
Make sure that when typing in lines 350, 360 and 380 that you don't press [RETURN] as these are simply very long lines.
Between line 430 and line 630 is the subroutine to draw the screen. It calls on separate subroutines, at lines 540 and 680, to draw the black and white counters.
From line 720 onwards the program loads a section of machine code into memory, including the data needed to provide the graphics for this program.
[BASIC-Listing und [Assembler-Listing]

HTML-Bearbeitung von Werner Cirsovius
Februar 2015
© 8000 PLUS