Class SameController

java.lang.Object
  extended by SameController

public class SameController
extends java.lang.Object

Controlls the game. Manages input from the view, and makes the changes to the model. Then tells the view to update itself.

Version:
1.5
Author:
Afzal Bhamjee

Nested Class Summary
 class SameController.Hint
          Class listening for events from Hint button
 
Constructor Summary
SameController(SameModel model, SameView view)
          Constructor takes the model and view as parameters
 
Method Summary
 void changeHover()
          Finds nearby matches, and then sets the hover score, after which the method to highlight the matches is called
 void changeHovered()
          Resets the hover score, and then calls the method to de-highlight Boxes
 void newGame()
          Sets some variables that needs to be set for each new game
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SameController

public SameController(SameModel model,
                      SameView view)
Constructor takes the model and view as parameters

Parameters:
SameModel, - the model to make the data manipulations to
SameView, - the view that will be updated with changes
Method Detail

changeHover

public void changeHover()
Finds nearby matches, and then sets the hover score, after which the method to highlight the matches is called


changeHovered

public void changeHovered()
Resets the hover score, and then calls the method to de-highlight Boxes


newGame

public void newGame()
Sets some variables that needs to be set for each new game