public class Game
extends java.lang.Thread
Modifier and Type | Field and Description |
---|---|
Config |
config
config can contain some configuration options
|
GameSpecification |
gameSpecification
specification of the game
|
GameLogger |
logger
logger is used to write informative messages about game progress to file
|
Player[] |
players
all players that are currently playing the game
|
GameState |
state
current state of the game
|
GameWindow |
window
board of the game shown in window
|
Constructor and Description |
---|
Game(Config config,
GameLogger logger,
GameWindow window,
Switch gameRuns,
Robot robot)
constructs a new game, saves references to the objects passed in arguments
|
Modifier and Type | Method and Description |
---|---|
void |
run()
game runs in separate thread, here
|
void |
setGameAndPlayers(GameSpecification gameSpecification,
Player[] players)
setup game specification and players objects
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public GameState state
public GameSpecification gameSpecification
public GameWindow window
public Config config
public GameLogger logger
public Player[] players
public Game(Config config, GameLogger logger, GameWindow window, Switch gameRuns, Robot robot)
public void setGameAndPlayers(GameSpecification gameSpecification, Player[] players)
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread