
/**
  *The abstract class that defines the interface for the ArcadeGameMatch
  *A match consists of a timer, a playingField and a game
  *@author John D. McGregor
  *@version 1.0
  */
abstract class ArcadeGameMatch implements TimeObservable{
	protected ArcadeGame _game;
	protected PlayingField _fieldPtr;
	protected Timer _timer;

	/**
	  *The constructor sets the reference to the game that is part of the match
	  *
	  */
	public ArcadeGameMatch(ArcadeGame theGame){
		_game = theGame;
	}

	/**
	  *The abstract signature for deleted method
	  *Extenders will provide specific actions
	  *@param aPiece is the ArcadeGamePiece to be deleted
	  *
	  */
	public abstract void deleted(ArcadeGamePiece aPiece);

	/**
	  *The abstract signature for starting the match
	  *This is a part of a GameControl interface
	  *Extenders will provide specific actions
	  *post: match is in the running state
	  */
	public abstract void start();

	/**
	  *Allows the match to be paused
	  *This is a part of a GameControl interface
	  *post: match is in the paused state
	  */
	public void pause(){
		_timer.pause();
	}

	/**
	  *Allows the match to be resumed
	  *This is a part of a GameControl interface
	  *post: match is in the running state
	  */
	public void resume(){
		_timer.resume();
	}

	/**
	  *The implementation of the TimeObservable interface
	  *Each tick is a moment in "Game time"
	  */
	public abstract void tick();

}