this code is for the game class...
can u pls check against the responsibilities of game as mentioned earlier...
all other codes are attached
CODE
/**
* Write a description of class Game here.
*
* @author (your name)
* @version (a version number or a date)
*/
public class Game
{
// instance variables - replace the example below with your own
private Grid grid;
private HighScores highScores;
private int score;
/**
* Constructor for objects of class Game
*/
public Game()
{
// initialise instance variables
highScores = new HighScores();
}
/**
*
*/
public void start()
{
grid = new Grid(25);
grid.shuffle();
score = 0;
}
/**
*
*/
public void end()
{
highScores.update(score);
}
/**
*
*/
public void cardSelected(int cardNumber)
{
grid.getCard(cardNumber).flip();
//If 2 cards selected then check equals and incr score
}
}