de.tabacha.cgo
Interface BackgroundGame

All Superinterfaces:
Game
All Known Implementing Classes:
DefaultGame

public interface BackgroundGame
extends Game

A data model for a game of ConwayGo played in another Thread in the background.
$Id: BackgroundGame.java,v 1.1 2004/07/30 21:05:58 mk Exp $

Version:
$Revision: 1.1 $

Method Summary
 void abort()
          Aborts the game.
 void destroy()
          Aborts the game, kills all running processes, frees all resources.
 boolean isAlive()
          Returns whether the game is stopped or running.
 void play()
          Starts playing the game.
 
Methods inherited from interface de.tabacha.cgo.Game
addGameListener, getBoard, getPlayer, getPlayerToMove, removeGameListener, setPlayer
 

Method Detail

play

public void play()
          throws java.lang.IllegalStateException
Starts playing the game. Game is played in the background, this method returns immediately.

Specified by:
play in interface Game
Throws:
java.lang.IllegalStateException - If a player is null or the game is already running.

isAlive

public boolean isAlive()
Returns whether the game is stopped or running.


abort

public void abort()
Aborts the game.


destroy

public void destroy()
Aborts the game, kills all running processes, frees all resources. This method is a kind of finalizer and is needed to support the 'destroy' method of applets.