O

t

h

e

l

l

o

/

R

e

v

e

r

s

i

(QuickBASIC/QBASIC)




Othello (or Reversi) is a very famous board game. I assume you all know how to play it already so I am not going to explain the rules of playing here.

About the program......

This is the first little AI (Artificial Intellegence) game I wrote. I have set two levels for it:-

Level 1 :

Level 2 :

That are the 'mind' I set for the program (Actually, I have no time and no intellegence to improve the AI any more! Ha ha!). Maybe you would like to do me a favour -- improve the AI for me.

This program is written with many functions and subprograms. The player's action is controlled by a function called Player$ which returns the location and command entered by player. Whereas a function Computer$ is the AI portion that the computer consider where to place the piece and return the appropriate action.

How to play the game?

You will need to answer some questions before you can play the game such as "how many player(s)?", "Name of player 1", and "choose a level". You can choose to play with program if you enter 1 for "how many player(s)?" or enter 2 to play with your friend.

After that, you can start the game. The program will determine who to play first by random. By using the Arrow keys, you can move the yellow block indicates the location. Press SPACE BAR or ENTER to place your piece. If you want resign, just press ESC.

Program will ask if you want to play again. Enter "Y" to replay or enter "N" to exit.

Maybe you are saying

Okay okay, just give me the source!
rEtUrN tO
QUICKBASIC FORUM


(Home) (About Lawrence) (QuickBASIC forum)

(PASSWORD LOCK 1.0) (My QuickBASIC Library)


~ A sub page of Lawrence's Homepage ~
Last modified on Wednesday, 30 October 1996 by
Lawrence Law, Spg Rengam, Johore, Malaysia