Creating Your Own Gamesman Module
- Read About Gamesman
- Explore this website a bit more.
- Sign up for Sourceforge and connect to us via CVS.
- Learn how to use CVS if you don't already know how to use it
- Install Gamesman
- At your UNIX Compatible shell, run
% ./configure
- Next, run
% make
You're done!
- At your UNIX Compatible shell, run
- Choose Your Game
- Design What Game You Want To Code.
- Resources:
- Elwyn Berlekemp, John H. Conway, and Richard K. Guy. Winning Ways for Your Mathematical Plays, Volume 1,2. Academic Press Inc., 1982. (red and blue books)
- Franco Agostino and Nicola Alberto DeCarlo. Intelligence Games. Simon and Schuster, 1985.
- Andrea Angiolino. Super Sharp Pencil & Paper Games. Sterling Publishing Co, Inc., 1995.
- John D. Beasley. The Mathematics of Games. Oxford University Press, 1989.
- R. C. Bell. Board and Table Games from Many Civilizations. Oxford University Press, 1979.
- R. C. Bell. The Boardgame Book. Exeter Books, 1983.
- Robbie Bell and MIchael Cornelius. Board Games Round the World: A Resourse Book for Mathematical Investigations. Cambridge University Press, 1988.
- Gyles Brandreth. The World's Best Indoor Games. Pantheon Books, 1981.
- Matthew J. Costello. The Greatest Games of All Time. John Wiley & Sons, 1991.
- Jon Freeman. The Playboy Winner's Guide to Board Games. Playboy Press, 1979.
- Frederic V. Grunfeld. Games of the World : how to make them, how to play them, how they came to be. UNICEF, 1975.
- Karl-Heinz Koch. Pencil & Paper Games. Sterling Publishing Co., Inc., 1992.
- Pentagram. Pentagames. Simon and Schuster, Inc., 1990.
- David Pritchard. Brain Games. Penguin Books Ltd., 1982.
- Eric Solomon. Games with Pencil and Paper. Dover, 1993.
- Create Variants For Your Game
- Think of other rules for your game.
- Code Your Game
- First, find a shortened version of your game name. Example: Tic-Tac-Toe -
ttt
- Take a look at modules already written for Gamesman to get a good idea on what you'll be doing.
- Familiarize yourself with the Gamesman hashing facility in
hash.c
andhash.h
. You will be using these to generatePOSITION
data types. - You must have these functions written at a minimum to run Gamesman on your game.
MOVEliST *GenerateMoves (POSITION position)
- Returns a MOVEliST containing all the possible moves from the given position.
POSITION DoMove(POSITION position, MOVE move)
- Applies the move to the position and returns the new position.
VALUE Primitive(POSITION position)
- Returns the value of the given position
- A
VALUE
is one ofwin
,lose
,tie
, orundecided
.
void PrintPosition(POSITION position, STRING playersName, BOOLEAN usersTurn)
- Prints the board with all necessary information
void PrintComputersMove(MOVE computersMove, STRING computersName)
- Prints the computer's move nicely.
void PrintMove(MOVE move)
- Prints the move in a human readable format.
USERINPUT GetAndPrintPlayersMove(POSITION position, MOVE *move, STRING playersName)
- We actually wrote this one for you. You only need to change one line.
MOVE ConvertTextInputToMove(STRING input)
- Converts a text move into your internally represented move.
- Design Your Graphics Interface
- Decide How You Will...
- Draw Your Pieces
- Interact With Your Pieces
- Display All Of Your Moves At Once (Through value-moves)
- Decide How You Will...
- Code Your Graphics Interface
- Learn Tcl/Tk. We use Tcl/Tk to run the Gamesman graphics interface.
- Code Your Tcl file in the
$GAMESMANROOT/tcl
directory. Take a look at preexisting files for ideas.
You're done!