Assignment #7 - 93B

Assignment #7 - 93B

Assignment 7                                            DUE Mon 30 Nov 93
============                                            WEIGHT 40
                                                        E-mail HDLV
                                                        TA L. Bernier
                                                       Tues: 10h30-12h30
                                                       Wed: 14h30-16h30

               >>>>  TIC-TAC-TOE Game  <<<<

For your last assignment you will program an interactive tic-tac-toe
game between you and the computer.

Your adversary - the computer - does not have to be a very
smart player,though you can teach it tricks if you want -
but you do not have to.  It only has to, say randomly,
put a mark in the grid when it is its turn to play.

Your program has to output the grid and its current status every
time it is your turn to play.  You also have to verify each
time a player enters a mark if the game is over,
i.e. if someone won and display the results if so.
This is an interactive game so the user should be able
to play as many games as he(she) wants.
You can have the program prompts you if you want to
play another game and responds appropriately.
When the user wants to quit, the program should output
the total number of games played, the numbers of
games won by the user and computer respectively together
with the overall champion of the tournament.

At the beginning of the game you should display brief
instructions to the user to explain him(her) how to
interact with the computer in order to play your
Tic-tac-toe game (how to enter his(her) next mark for example)

Use a good programming style with procedures and functions called
from main program; your main program should be kept to
a minimum size.

Try also to include verifications procedures for the user's inputs:
  - is it out of range?
  - is the position already occupied?
  - etc.

 * Use the classical 3*3 version of Tic-tac-toe.