net.sourceforge.yagurashogi.client.core
Class Game

java.lang.Object
  extended by java.lang.Thread
      extended by net.sourceforge.yagurashogi.client.core.Game
All Implemented Interfaces:
java.lang.Runnable

public class Game
extends java.lang.Thread


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static int DOWN
           
static java.awt.Color LIGHTBROWN
           
static int NONE
           
static int UP
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Game(Player downPlayer, Player upPlayer, ShogiBoard board)
           
 
Method Summary
 void endGame()
           
 void endGame(int winner)
           
 ShogiBoard getBoard()
           
 int getByoyomi()
           
 Player getCurrentOpponent()
           
 Player getCurrentPlayer()
           
 int getCurrentSide()
           
 int getFirstPlayer()
           
 int getOwnerSide()
           
 Player getPlayer(int side)
           
 int getTotalTime()
           
 boolean isLocalGame()
           
static int opponent(int side)
           
 void run()
           
 void runTimers()
           
 void setByoyomi(int byoyomi)
           
 void setByoyomiLabel(javax.swing.JLabel label)
           
 void setCurrentPlayerLabel(javax.swing.JLabel label)
           
 void setFirstPlayer(int side)
           
 void setGameTimeLabel(javax.swing.JLabel label)
           
 void setTotalTime(int totalTime)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

UP

public static final int UP
See Also:
Constant Field Values

DOWN

public static final int DOWN
See Also:
Constant Field Values

NONE

public static final int NONE
See Also:
Constant Field Values

LIGHTBROWN

public static final java.awt.Color LIGHTBROWN
Constructor Detail

Game

public Game(Player downPlayer,
            Player upPlayer,
            ShogiBoard board)
Method Detail

getBoard

public ShogiBoard getBoard()

isLocalGame

public boolean isLocalGame()

setGameTimeLabel

public void setGameTimeLabel(javax.swing.JLabel label)

setByoyomiLabel

public void setByoyomiLabel(javax.swing.JLabel label)

setCurrentPlayerLabel

public void setCurrentPlayerLabel(javax.swing.JLabel label)

getOwnerSide

public int getOwnerSide()

getPlayer

public Player getPlayer(int side)

opponent

public static int opponent(int side)

setFirstPlayer

public void setFirstPlayer(int side)

getFirstPlayer

public int getFirstPlayer()

getCurrentSide

public int getCurrentSide()

getCurrentPlayer

public Player getCurrentPlayer()

getCurrentOpponent

public Player getCurrentOpponent()

setTotalTime

public void setTotalTime(int totalTime)

setByoyomi

public void setByoyomi(int byoyomi)

getTotalTime

public int getTotalTime()

getByoyomi

public int getByoyomi()

runTimers

public void runTimers()

run

public void run()
Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread

endGame

public void endGame()

endGame

public void endGame(int winner)