Boston University -- Computer Science Department


The Game of War

Please save the following files (in a new directory):

game.h

main.c

game.c

makefile

Now get into emacs by calling

%e main.c&

Compile the program by M-x compile

Emacs will suggest using make -k for compilation, agree by hitting return.

If you run a program now, it will prompt you for step. Your program will show you the results of the every "step" round. Thus if you choose step=10, then you will be notified about every tenth round. On your first run there will be more than 200 rounds, thus you don't want your step to be too small. Now use gdb to find out the first card in your hand. Your assignment for this lab will consist of writing 2 functions that are defined in the file game.c.

Do not forget about good programming practices, adequate comments and documentation for your functions. Everybody should be able to understand what your have done and why.

Enjoy,

Irene


This page was created by Irene Gassko.

Last updated on October 7, 1996.