player
Class Player
java.lang.Object
|
+--java.lang.Thread
|
+--player.Player
- All Implemented Interfaces:
- Runnable
- public class Player
- extends Thread
Class that implements a player in the ICFP-2002 programming contest.
- Version:
- $Revision: 1.6 $
- Author:
- Allen D. Ball
Constructor Summary |
Player(World world)
Creates a player thread. |
Methods inherited from class java.lang.Thread |
, activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Player
public Player(World world)
- Creates a player thread.
- Parameters:
world
- The world environment of the game.
getWorld
public World getWorld()
- Method to get the player's world.
- Returns:
- The player's world.
getConnection
public Connection getConnection()
- Method to get the player's connection.
- Returns:
- The connection connecting to the game
server.
setConnection
public void setConnection(Connection connection)
- Method to set the player's connection.
- Parameters:
connection
- The connection connecting to the game
server.
setGUI
public void setGUI(GUI gui)
- Method to set the GUI interface. The GUI is notified at end of
each turn.
- Parameters:
gui
- The GUI.
getPlayerRobot
public PlayerRobot getPlayerRobot()
- Method to get the player's robot.
- Returns:
- The player's robot.
run
public void run()
- Overrides:
run
in class Thread
Copyright 2002 Allen D. Ball. All rights reserved.