Author: Lorena G Rosas
USER ID: lrosas
GAME: The Coin Memory Guess Game (final version)
4/23/01


FILES:

My_Interface.java             //source code
makefile()
readme 

DESCRIPTION:

The game runs as an application.  The game consists on outguessing the computer.  If the computer loses
it will destroy itself.  In each turn the computer will guess the user selection of iether Heads or
Tails.  If the computer guess is correct the coin value will be added to its score and the user loses
the points worth for the current coin value.  The are four levels in the game.  Each level has a
different coin value, and maximum points to go to the next level.

Level:	1	2	3	4
Coin $:	5	25	50	1
Points: 100	500	1000	2000

For the first moves of the game a random number generator from (0-20) will be used to make a computer
guess.  If the 0 < random number<10 choose "Head", otherwise choose "Tail." After the first four moves
are made use a Artificial Algorithm called "computer memory" to make a guess.  The algorithm keeps
track of the last four guess, then it searches its memory to find the last four moves combination.  Each
posible combination will have two columns keeping track of the next number of Heads or Tails the user
made after that sequences. The computer picks the higher number of either column for the next guess.


IMPLEMENTATION:

The layout consists of 4 panels.  Each panel has the different components needed to play the game.  The
game starts by creating the required componets. Then the screen is initialize and a guess is generated
from the constructor.  As the user selects iether "HEAD" or "TAILS" a number of methods are called.
There are methods to update scores, display scores, check points, game over screen, start new game,
display computer memory, and display  computer guess.   

The computer memory is a two dimentional array of integers.  The last four moves for each try are stored
in a one dimentional array.  

If a game is terminated, or the 4th level is won by the user, two of the panels are changed from its
original format.  The two panels are "restored" when the new_game button is pressed.

For additional implementation help refer to source code file

CHANGES MADE FROM ORIGINAL CONCEPT

In general all the concepts mentioned from MP5 are implemented successfully in the final version.   
The changes made are to enhence the program performance.  There are only one major change from the
original concept.  For the final version the computer memory is NOT re-initialize for every new level.  
This makes the computer to have more memory and therefore generating a better guess.  The change makes
the computer almost impossible to outguess.  

The description in MP5 had all the necesary steps to complete the game.  After completing the assignment 
I came up with more ideas that can be implemented on a future to make the game more fun to play.  For
example add a timer for the user (the less time it takes for the user to make a move the more points it
gets).    

    
 
