A B C D E F G H I K L M N O P R S T U V W

A

ACCELERATION - Static variable in class dualroids.SpaceShip
The acceleration of the ship when the ship is thrusting.
actAsServer() - Method in class dualroids.Runner
Starts server and waits for connections, then starts the game.
actButton - Variable in class dualroids.Runner
the buttons in the main dialog
actionPerformed(ActionEvent) - Method in class dualroids.Runner
This takes care of the frame's buttons and invokes suitable methods.
angle - Variable in class dualroids.SpaceShip
The rotation angle (in radians) of the spatial object at the moment indicated by timestamp.
angle - Variable in class dualroids.Asteroid
The rotation angle (in radians) of the spatial object at the moment indicated by timestamp.
ANGULAR_VELOCITY - Static variable in class dualroids.SpaceShip
The angular velocity of the ship when the ship is turning.
angularVelocity - Variable in class dualroids.Asteroid
The angular velocity (radians per millisecond) of the asteroid.
arena - Variable in class dualroids.Server
The server's copy of the arena
arena - Variable in class dualroids.ClientModelConnector
the client's arena
arena - Variable in class dualroids.SpaceArea
An arena object, which is used to fetch the shapes to draw
arena - Variable in class dualroids.ServerModelConnector
the server's arena
Arena - class dualroids.Arena.
The game arena that holds all the spatial objects.
Arena(int, long) - Constructor for class dualroids.Arena
Contructs an Arena including the SpatialObjects in it for a new level.
Asteroid - class dualroids.Asteroid.
The representation of an asteroid in the model.
Asteroid(double, double, double, double, long, int) - Constructor for class dualroids.Asteroid
Contructs a new asteroid.
asteroidIndex - Variable in class dualroids.Server
A counter for controlling the asteroid updating iteration.
asteroids - Variable in class dualroids.Arena
An array holding all the asteroids

B

BG_GRAPHIC - Static variable in class dualroids.SpaceArea
File name of the background image
bgImage - Variable in class dualroids.SpaceArea
The background image
BLEAK_GRAY - Static variable in class dualroids.SpaceArea
A semi-transparent gray color for showing end texts
blowUpAsteroid(Asteroid[], int, double, double, long, boolean) - Static method in class dualroids.Asteroid
Makes an asteroid explode and initalizes the residual asteroids accordingly.
blowUpShip(int, long) - Method in class dualroids.Server
Blows up a ship
buffer1 - Variable in class dualroids.SpaceArea
Background image buffer
buffer2 - Variable in class dualroids.SpaceArea
Foreground image buffer, works best with accelerated graphics
Bullet - class dualroids.Bullet.
The representation of a bullet.
BULLET_HALF_LENGTH - Static variable in class dualroids.Bullet
Constant for the length of a bullet divided by 2.
BULLET_INTERVAL - Static variable in class dualroids.SpaceShip
The minimum delay between firing bullets.
BULLET_TTL - Static variable in class dualroids.Bullet
The lifetime of a bullet in milliseconds.
BULLET_VELOCITY - Static variable in class dualroids.Bullet
Constant for the bullet velocity.
Bullet() - Constructor for class dualroids.Bullet
Contructs a new bullet.
bulletFireIndex - Variable in class dualroids.SpaceShip
The index of the previously fired bullet.
bullets - Variable in class dualroids.SpaceShip
An array holding all the (recyclable) bullets owned by this ship.

C

CENTER_POINTS - Static variable in class dualroids.SpaceShip
The coordinated of the center poins of the edges of the ship.
centers - Variable in class dualroids.Asteroid
An array for storing the coordinates of the centers of the edges of this asteroid.
checkCollisions(long) - Method in class dualroids.Server
Checks collisions in the arena (ships or bullets hitting asteroids).
CLEAR - Static variable in class dualroids.SpaceArea
A 'clear' color, fully transparent
client - Variable in class dualroids.Runner
the client thread
Client - class dualroids.Client.
The helper class for running Client threads.
CLIENT_SHIP_INDEX - Static variable in class dualroids.ClientModelConnector
the ship indices
Client(String, boolean, String) - Constructor for class dualroids.Client
Saves the hostname, local and playerName fields.
ClientModelConnector - class dualroids.ClientModelConnector.
The client-side interface to network.
ClientModelConnector(String, boolean, String) - Constructor for class dualroids.ClientModelConnector
This constructor is called from the factory method below.
clockDiff - Variable in class dualroids.ClientModelConnector
the clock difference between server and client: clockDiff = serverTime - clientTime
close() - Method in class dualroids.ClientModelConnector
A public method for initiating the close procedure from outside this connector
close(int) - Method in class dualroids.ClientModelConnector
Closes the the ship state pump and output stream, if they are not already closed and calls the other connector to close its streams too.
close(int) - Method in class dualroids.ServerModelConnector
Closes the output stream, if it's not already closed and calls the other connector to close its streams too.
COLOR_STEP - Static variable in class dualroids.SpaceShip
The amount of time used for one outline color in explosion
COLOR_STEP - Static variable in class dualroids.Asteroid
The amount of time used for one outline color in an explosion.
COLOR_TABLE - Static variable in class dualroids.SpatialObject
17 shades of gray ready to use in Asteroid and SpaceShip objects
COLOR_TABLE_BLACK - Static variable in class dualroids.SpatialObject
The index of black in COLOR_TABLE.
COLOR_TABLE_GRAY_50 - Static variable in class dualroids.SpatialObject
The index of 50% gray in COLOR_TABLE.
COLOR_TABLE_WHITE - Static variable in class dualroids.SpatialObject
The index of white in COLOR_TABLE.
connectButton - Variable in class dualroids.Runner
the buttons in the main dialog
connector - Variable in class dualroids.SpaceShip
The ClientModelConnector through which this ship can send its state to the server.
connector - Variable in class dualroids.InputHandler
The associated ClientModelConnector.
connector - Variable in class dualroids.SpaceArea
The connector to the client
connectors - Variable in class dualroids.Server
An array holding all the connectors through which the server sends data to the clients.
connectToServer() - Method in class dualroids.Runner
Gathers the necessary information to connect to the server and connects to the server and starts the game.
createClientModelConnector(String, boolean, String) - Static method in class dualroids.ClientModelConnector
This factory method creates a new ClientModelConnector and performs the ping to get the clock difference.
createServerModelConnectors(String) - Static method in class dualroids.ServerModelConnector
This method should be called to initialize the two connectors.
currentServerMillis() - Method in class dualroids.ClientModelConnector
Returns the valid server time, which is the valid game time.

D

DEBRIS_ANGULAR_VELOCITY - Static variable in class dualroids.SpaceShip
The angular velocity of ship debris.
DEBRIS_LIFETIME - Static variable in class dualroids.Asteroid
The lifetime of asteroid debris.
DEBRIS_POINTS - Static variable in class dualroids.SpaceShip
An array holding coordinate constants used when drawing debris.
DEBRIS_VELOCITY_FACTOR - Static variable in class dualroids.SpaceShip
A factor used when calculating the velocity of debris.
DEBRIS_VELOCITY_FACTOR - Static variable in class dualroids.Asteroid
Constant used when calculating the movement of asteroid debris.
doLoop - Variable in class dualroids.ShipStatePump
A boolean indicating whether the pumping should be continued.
drawEndCredits(Graphics2D) - Method in class dualroids.SpaceArea
Draws end credits when the game ends.
drawScoreBoard() - Method in class dualroids.SpaceArea
Draws the scoreboard into buffer2, so that scores can float above the asteroids (buffer2 has an alpha channel).
dualroids - package dualroids
 

E

earliestNextBullet - Variable in class dualroids.SpaceShip
Indicates when the next bullet can fired at the earliest.
echoPing() - Method in class dualroids.ServerModelConnector
The client sends us the clientTime, and we send the time difference back The echoPing() method should be called only from the createServerModelConnectors() factory method.
expires - Variable in class dualroids.Bullet
The moment in time when this bullet expires
explode(long) - Method in class dualroids.SpaceShip
Makes the ship explode.
explode(long) - Method in class dualroids.Asteroid
Tells the asteroid to explode.
explodeOnServer() - Method in class dualroids.Asteroid
Tells the asteroid to explode withou debris effects.
exploding - Variable in class dualroids.Asteroid
A boolean indicating whether the asteroid is currently exploding (that is, whether debris is visible).

F

fatalError(String) - Static method in class dualroids.Runner
This method should be used whenever a fatal error occurs and we want to inform the user about it.
fire(double, double, double, double, double, long) - Method in class dualroids.Bullet
Fires this bullet.
fireBullet(long) - Method in class dualroids.SpaceShip
Fires a bullet and marks it fired at time.
flush() - Method in class dualroids.Server
Flushes both connectors and thus causes the buffered data in network streams to flush too.
flush() - Method in class dualroids.ClientModelConnector
Flushes the network output stream
flush() - Method in class dualroids.ServerModelConnector
Flushes the network output stream

G

GAME_OVER_FONT - Static variable in class dualroids.SpaceArea
Font for displaying the 'Game Over' -text
gameFrame - Variable in class dualroids.Client
the main game frame
GameFrame - class dualroids.GameFrame.
The game window.
GameFrame(ClientModelConnector) - Constructor for class dualroids.GameFrame
Contructs a new GameFrame.
gameOver - Variable in class dualroids.ClientModelConnector
a boolean indicating whether the game is over or not
gameOver - Variable in class dualroids.SpaceArea
Toggles whether the game is over
gameOver() - Method in class dualroids.SpaceArea
Called externally when the game is over.
GameOverException - exception dualroids.GameOverException.
Thrown to indicate the end of the game.
GameOverException() - Constructor for class dualroids.GameOverException
 
generateResidualAsteroids(Asteroid[]) - Static method in class dualroids.Asteroid
Generates residual asteroids in the array of asteroids passed as the argument.
geometry - Variable in class dualroids.SpatialObject
The untranslated geometric representation of the spatial object
getArena() - Method in class dualroids.ClientModelConnector
Getter method for the arena
getAsteroids() - Method in class dualroids.Arena
Return an array holding references to all asteroids.
getBullets() - Method in class dualroids.SpaceShip
Returns the Bullet array of this ship.
getInputHandler() - Method in class dualroids.ClientModelConnector
Getter method for the inputHandler
getInstance() - Static method in class dualroids.GameFrame
This assures that no one can create more than one instance of GameFrame (singleton pattern)
getInstance() - Static method in class dualroids.Runner
This assures that no one can create more than one instance of Runner (singleton pattern)
getInstance(ClientModelConnector) - Static method in class dualroids.GameFrame
This assures that no one can create more than one instance of GameFrame (singleton pattern)
getLevelStarts() - Method in class dualroids.Arena
Returns the starting time of the level.
getLocation(long) - Method in class dualroids.Bullet
Returns the location of the bullet at time.
getLocationX(long) - Method in class dualroids.Asteroid
Returns the x coordinate of the location of the asteroid at time.
getLocationY(long) - Method in class dualroids.Asteroid
Returns the y coordinate of the location of the asteroid at time.
getNames() - Method in class dualroids.HighScoreHandler
Returns the table of the names of the famed players
getOutlineColor() - Method in class dualroids.SpaceShip
Returns the outline color of the ship.
getOutlineColor() - Method in class dualroids.Asteroid
Returns the outline color of the asteroid.
getPlayerName(int) - Method in class dualroids.ClientModelConnector
Getter method for the playerName
getPoints() - Method in class dualroids.Asteroid
Returns the points awarded for blowing up this asteroid.
getPoints() - Method in class dualroids.HighScoreHandler
Returns the table of the points of the famed players
getScore(int) - Method in class dualroids.ClientModelConnector
Getter method for the scoreTable
getShipIndex() - Method in class dualroids.ClientModelConnector
Getter method for the shipIndex
getShipsLeft(int) - Method in class dualroids.ClientModelConnector
Getter method for the shipsLeft
getSize() - Method in class dualroids.Asteroid
Indicates the size of the asteroid.
getSpaceShips() - Method in class dualroids.Arena
Return an array holding references to all spaceships.
getTransformedShape(long) - Method in class dualroids.SpatialObject
Returns a properly translated Shape representing the spatial object at time
getTransformedShape(long) - Method in class dualroids.SpaceShip
Returns a properly transformed Shape representing the spatial object at time
getTransformedShape(long) - Method in class dualroids.Asteroid
Returns a properly transformed Shape representing the spatial object at time
getTransformedShape(long) - Method in class dualroids.Bullet
Returns a properly transformed Shape representing the spatial object at time
getVertices(long) - Method in class dualroids.SpaceShip
Returns the vertices of the ship polygon at time.

H

HEIGHT - Static variable in class dualroids.Arena
Constant for the height of the arena.
HighScoreHandler - class dualroids.HighScoreHandler.
A class for handling the high score file.
HighScoreHandler(ClientModelConnector) - Constructor for class dualroids.HighScoreHandler
Constucts a new HighScoreHandler and does the file IO.
hints - Variable in class dualroids.SpaceArea
Rendering hints for rendering asteroids, spaceships etc.
hitsToExplosion - Variable in class dualroids.Asteroid
The number of hits it takes to make this asteroid explode.
host - Variable in class dualroids.Runner
the host name string
hostname - Variable in class dualroids.Client
the host name to connect the client to

I

init() - Method in class dualroids.SpaceShip
Does real ship initialization.
initFromRemote(double, double, double, double, double, double, long, long) - Method in class dualroids.Bullet
Initializes the state of the bullet from external state data.
INITIAL_SHIPS - Static variable in class dualroids.Server
The number of spare ships the player has initially.
inputHandler - Variable in class dualroids.ClientModelConnector
the client's input handler
InputHandler - class dualroids.InputHandler.
Class for handling keyboard input and windowClosing window event.
InputHandler(ClientModelConnector) - Constructor for class dualroids.InputHandler
Contructs a new InputHandler.
internalClose(int) - Method in class dualroids.ClientModelConnector
Closes the the ship state pump and output stream, if they are not already closed.
internalClose(int) - Method in class dualroids.ServerModelConnector
Closes the output stream, if it's not already closed and calls the other connector to close its streams too.
invalidate() - Method in class dualroids.Bullet
Marks the bullet non-flying (not visible)
invalidateBullet(int, int) - Method in class dualroids.Server
Marks a bullet non-flying (not visible).
INVULNERABILITY_PERIOD - Static variable in class dualroids.Server
The duration of the ship invulnerability period when a player gets a new ship.
isVisible() - Method in class dualroids.Asteroid
Indicates whether the asteroid is visible.

K

keyPressed(KeyEvent) - Method in class dualroids.InputHandler
Handles key pressed events.
keyReleased(KeyEvent) - Method in class dualroids.InputHandler
Handles key released events.
keyTyped(KeyEvent) - Method in class dualroids.InputHandler
Dummy handler for key typed events.

L

LARGE - Static variable in class dualroids.Asteroid
Constant for indicating that the asteroid is large
LARGE_EXPLOSION_EXTRA - Static variable in class dualroids.Asteroid
Constant used when modeling the extra energy released when a large asteroid explodes.
level - Variable in class dualroids.Server
The level number counter
LEVEL_START_DELAY - Static variable in class dualroids.Server
The delay between the beginning of level generation and the start of the level.
levelStarts - Variable in class dualroids.Arena
The starting time of the level.
lineDeltaX - Variable in class dualroids.Bullet
The x difference of the between the center of bullet the end of the bullet line
lineDeltaY - Variable in class dualroids.Bullet
The y difference of the between the center of bullet the end of the bullet line
local - Variable in class dualroids.Client
whether the client is local to the server or not
locationX - Variable in class dualroids.SpatialObject
The x coordinate of the center of the spatial object at the moment indicated by timestamp.
locationY - Variable in class dualroids.SpatialObject
The y coordinate of the center of the spatial object at the moment indicated by timestamp.

M

main(String[]) - Static method in class dualroids.Runner
The main method for starting the game.
makeVisible() - Method in class dualroids.Asteroid
Makes the asteroid visible.
MAX_VELOCITY - Static variable in class dualroids.SpaceShip
The maximum velocity of the ship.
MEDIUM - Static variable in class dualroids.Asteroid
Constant for indicating that the asteroid is medium-sized
MEDIUM_EXPLOSION_EXTRA - Static variable in class dualroids.Asteroid
Constant used when modeling the extra energy released when a medium-sized asteroid explodes.
MIN_ITERATION_INTERVAL - Static variable in class dualroids.Server
Constant for the minimal interval (in milliseconds) between the starts of two server model update iterations.
moveToRangeX(double) - Static method in class dualroids.SpatialObject
Moves value to the range 0.0...Arena.WIDTH so that the coordinate wraps around.
moveToRangeY(double) - Static method in class dualroids.SpatialObject
Moves value to the range 0.0...Arena.HEIGHT so that the coordinate wraps around.

N

names - Variable in class dualroids.HighScoreHandler
The table of the names of the famed players
NEW_SHIP_DELAY - Static variable in class dualroids.Server
The delay before a new ships appears when a ship has exploded.
newAppears - Variable in class dualroids.SpaceShip
Indicates when a 'new' ship appears after the ship has exploded.
NUM_OF_BULLETS - Static variable in class dualroids.SpaceShip
The number of bullets this ship can have flying at a time.
NUM_OF_VERTICES - Static variable in class dualroids.SpaceShip
A constant indicating the number of vertices in the ship polygon.

O

OC_ARENA - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_ASTEROID_LOCATION_AND_ANGLE - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_BLOW_UP_ASTEROID - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_BLOW_UP_SHIP - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_BULLET_FIRED - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_CLIENT_CLOSE - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_EOF - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_GAME_OVER - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_INIT_BULLET - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_INVALIDATE_BULLET - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_PLAYER_NAME - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_SCORE - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_SERVER_CLOSE - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_SHIP_STATE - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
OC_SHIPS_LEFT - Static variable in class dualroids.ServerModelConnector
opcodes for the network protocol
ois - Variable in class dualroids.ClientModelConnector
the ObjectInputStream for this connector
ois - Variable in class dualroids.ServerModelConnector
the ObjectInputStream for this connector
oos - Variable in class dualroids.ClientModelConnector
the ObjectOutputStream for this connector
oos - Variable in class dualroids.ServerModelConnector
the ObjectOutputStream for this connector
otherConnector - Variable in class dualroids.ServerModelConnector
the other ServerModelConnector
otherPlayerHasQuit - Variable in class dualroids.ClientModelConnector
a boolean indicating whether the other player has already quit
otherPlayerQuit - Variable in class dualroids.SpaceArea
Toggles whether other player has quit
otherPlayerQuit() - Method in class dualroids.SpaceArea
Called externally when the other player has quit.
outlineColor - Variable in class dualroids.SpaceShip
the outline color as an index to SpatialObject.COLOR_TABLE
outlineColor - Variable in class dualroids.Asteroid
the outline color as an index to SpatialObject.COLOR_TABLE

P

paint(Graphics) - Method in class dualroids.SpaceArea
Draws the game screen and updates it.
paintScoreBoard() - Method in class dualroids.SpaceArea
Paints scoreboard into buffer1 with the background image.
PING_COUNT - Static variable in class dualroids.ClientModelConnector
The static variables for getPing() method
PING_SLEEP_TIME - Static variable in class dualroids.ClientModelConnector
The static variables for getPing() method
ping() - Method in class dualroids.ClientModelConnector
Determines the difference between client and server machine clocks using socket connections and ObjectInput/OutputStreams.
PLAYER_HAS_QUIT_FONT - Static variable in class dualroids.SpaceArea
Font for displaying the 'Other player has quit' text
player1 - Variable in class dualroids.SpaceArea
Name of player 1
player2 - Variable in class dualroids.SpaceArea
Name of player 2
playerName - Variable in class dualroids.Server
The name of the player who is running the server
playerName - Variable in class dualroids.Runner
the player name string
playerName - Variable in class dualroids.Client
the player's name of this client
playerName - Variable in class dualroids.ServerModelConnector
The players' name of the client to which this connector is connected
playerNameField - Variable in class dualroids.Runner
the field for player name in the main dialog
playerNames - Variable in class dualroids.ClientModelConnector
the players' names
points - Variable in class dualroids.Asteroid
 
points - Variable in class dualroids.HighScoreHandler
The table of the points of the famed players
pump - Variable in class dualroids.ClientModelConnector
the client's ShipStatePump

R

readArena() - Method in class dualroids.ClientModelConnector
Receives the Arena object to the client
readAsteroidLocationAndAngle() - Method in class dualroids.ClientModelConnector
Tells the client the location and angle of asteroid number index
readBlowUpAsteroid() - Method in class dualroids.ClientModelConnector
Tells the client to blow up asteroid number index
readBlowUpShip() - Method in class dualroids.ClientModelConnector
Tells the client that the ship at shipIndex has blown up.
readBulletFired() - Method in class dualroids.ServerModelConnector
Tells the server that a bullet has been fired by the ship controlled by this client.
readInitBullet() - Method in class dualroids.ClientModelConnector
Tells the client that a bullet has been fired by the ship controlled by the other client.
readInvalidateBullet() - Method in class dualroids.ClientModelConnector
Marks a bullet non-flying (not visible).
readObject(ObjectInputStream) - Method in class dualroids.SpaceShip
Deserializes the ship on the client side.
readObject(ObjectInputStream) - Method in class dualroids.Asteroid
Deserializes the asteroid on the client side.
readPlayerName() - Method in class dualroids.ClientModelConnector
Read the player name and update it to the score board
readPlayerName() - Method in class dualroids.ServerModelConnector
Read the player name of the client connected to this connector and save it temporarily to the this.playerName field.
readScore() - Method in class dualroids.ClientModelConnector
Read the new scores of a player.
readShipsLeft() - Method in class dualroids.ClientModelConnector
Tells the client the number of ships a player has left.
readShipState() - Method in class dualroids.ClientModelConnector
Tells the client the state of the other space ship.
readShipState() - Method in class dualroids.ServerModelConnector
Reads the state of the space ship controlled by this connector's client, forwards the information to the other connector's client and updates the information to the model.
readyToBeFired() - Method in class dualroids.Bullet
Returns a boolean indicating whether the bullet is ready to be fired.
registerArena(Arena) - Method in class dualroids.SpaceArea
Registers an Arena for painting.
registerAsteroidHit(int, int, long) - Method in class dualroids.Server
Register a bullet hit to an asteroid.
registerConnector(ClientModelConnector) - Method in class dualroids.SpaceShip
Registers a ClientModelConnector with the ship for sending ship state to the server.
registerHit() - Method in class dualroids.Asteroid
Registers a bullet hit to the asteroid and checks whether it explodes.
registerShip(SpaceShip) - Method in class dualroids.InputHandler
Registers a SpaceShip for contrilling through this InputHandler.
registerShip(SpaceShip) - Method in class dualroids.ShipStatePump
Registers the ship whose state is to be pumped.
registerSpaceArea(SpaceArea) - Method in class dualroids.ClientModelConnector
Saves the space area reference.
run() - Method in class dualroids.Server
The method that starts the server thread.
run() - Method in class dualroids.ClientModelConnector
JVM runs this method when start() is called for this thread.
run() - Method in class dualroids.Client
JVM calls this method when the client thread is started with the start() method call.
run() - Method in class dualroids.ShipStatePump
Starts the pump.
run() - Method in class dualroids.ServerModelConnector
JVM runs this method when start() is called for this thread.
runLevel() - Method in class dualroids.Server
The method for running a level
Runner - class dualroids.Runner.
This class shows the setup dialogs to the user and starts the game.
Runner() - Constructor for class dualroids.Runner
the constructor, which should only be called from the getInstance() method (singleton pattern).

S

s - Variable in class dualroids.ClientModelConnector
the socket this connector uses
s - Variable in class dualroids.ServerModelConnector
the socket this connector uses
SCORE_1UP - Static variable in class dualroids.Server
The interval in scores when player should get an additional spare ship
SCORE_BOARD_FONT - Static variable in class dualroids.SpaceArea
Font for displaying scoreboard during the game
SCORE_FONT - Static variable in class dualroids.SpaceArea
Font for displaying high scores when the game ends
score1 - Variable in class dualroids.SpaceArea
Score of player 1
score2 - Variable in class dualroids.SpaceArea
Score of player 2
scoreboardUpdated - Variable in class dualroids.SpaceArea
Toggles whether the score board has been updated
scoreFile - Static variable in class dualroids.HighScoreHandler
The name of the high score file.
scoreHandler - Variable in class dualroids.SpaceArea
A high score-handler to save/load highscores
scores - Variable in class dualroids.Server
The score table.
scoreTable - Variable in class dualroids.ClientModelConnector
the players' scores
sendArena() - Method in class dualroids.Server
Sends the arena to the clients.
server - Variable in class dualroids.Runner
the server thread
Server - class dualroids.Server.
The Dualroids game server.
SERVER_PORT - Static variable in class dualroids.ServerModelConnector
server listens on this port
SERVER_SHIP_INDEX - Static variable in class dualroids.ClientModelConnector
the ship indices
Server(String) - Constructor for class dualroids.Server
Contructs a new Server.
ServerModelConnector - class dualroids.ServerModelConnector.
The server-side interface to network.
ServerModelConnector(Socket, int) - Constructor for class dualroids.ServerModelConnector
The constructor initializes streams from the given socket.
setLocationAndAngle(double, double, double, long) - Method in class dualroids.Asteroid
Sets the location and angle of this asteroid.
setPlayerName(String) - Method in class dualroids.ClientModelConnector
Setter method for this client's playerName
setStateFromRemote(double, double, double, double, double, long) - Method in class dualroids.SpaceShip
Sets the state of the ship to values received from the network.
setup() - Method in class dualroids.Runner
Setup screen, which asks for the player's name and gives two choices: Connect to server and Act as server.
setVisible() - Method in class dualroids.Client
This method gets rid of the setup screen windows and shows the main game window.
ship - Variable in class dualroids.InputHandler
The ship that is controlled by this InputHandler.
ship - Variable in class dualroids.ShipStatePump
The SpaceShip whose state this ShipStatePump pumps.
shipIndex - Variable in class dualroids.ClientModelConnector
The index of the ship owned by the client to which this connector is connected.
shipIndex - Variable in class dualroids.ServerModelConnector
The index of the ship owned by the client to which this connector is connected.
ships1 - Variable in class dualroids.SpaceArea
Number of ships player 1 has left
ships2 - Variable in class dualroids.SpaceArea
Number of ships player 2 has left
shipsLeft - Variable in class dualroids.Server
The table of remaining ships.
shipsLeft - Variable in class dualroids.ClientModelConnector
the players' unused ships
ShipStatePump - class dualroids.ShipStatePump.
Pumps the ship state to the server.
ShipStatePump() - Constructor for class dualroids.ShipStatePump
Contructs a new ShipStatePump.
size - Variable in class dualroids.Asteroid
The size of the asteroid.
SMALL - Static variable in class dualroids.Asteroid
Constant for indicating that the asteroid is small
spaceArea - Variable in class dualroids.ClientModelConnector
the space area
SpaceArea - class dualroids.SpaceArea.
Draws the actual playing field.
SpaceArea(ClientModelConnector) - Constructor for class dualroids.SpaceArea
Constructor for this class: initializes all necessary parameters.
SpaceShip - class dualroids.SpaceShip.
The representation of a space ship.
SpaceShip(double, double, long) - Constructor for class dualroids.SpaceShip
Contructs a new SpaceShip
spaceShips - Variable in class dualroids.Arena
An array holding all the spaceships
SpatialObject - class dualroids.SpatialObject.
The common superclass for all spatial objects.
SpatialObject() - Constructor for class dualroids.SpatialObject
Dummy constructor for keeping the serialization framework happy.
SpatialObject(double, double, double, double, long) - Constructor for class dualroids.SpatialObject
Contructs a new SpatialObject.
startThrust(long) - Method in class dualroids.SpaceShip
Starts thrusting.
startTurnCCW(long) - Method in class dualroids.SpaceShip
Starts turning counter-clockwise.
startTurnCW(long) - Method in class dualroids.SpaceShip
Starts turning clockwise.
stop() - Method in class dualroids.ShipStatePump
Tells the pump to stop.
stopThrust(long) - Method in class dualroids.SpaceShip
Stops thrusting.
stopTurnCCW(long) - Method in class dualroids.SpaceShip
Stops turning counter-clockwise.
stopTurnCW(long) - Method in class dualroids.SpaceShip
Stops turning clockwise.

T

TEXT_ANTIALIASING - Static variable in class dualroids.Runner
a constant indicating whether text should be antialiased
theInstance - Static variable in class dualroids.GameFrame
The single instance of GameFrame
theInstance - Static variable in class dualroids.Runner
a static instance of the Runner (singleton pattern)
thrustOn - Variable in class dualroids.SpaceShip
Indicates whether the ship is thrusting.
timestamp - Variable in class dualroids.SpatialObject
The moment in game (server) time for which the other fields are valid.
transform - Variable in class dualroids.SpatialObject
The AffineTransform used for calculating the translated geometry.
translatableLine - Variable in class dualroids.Bullet
The Line2D instance used for returning the translated Shape representation of the bullet
translatableLocation - Variable in class dualroids.Bullet
The Point2D instance used for returning the translated location of the bullet
translatableVertices - Variable in class dualroids.SpaceShip
An array holding the translated copies of the vertices ship polygon.
TURN_CCW - Static variable in class dualroids.SpaceShip
A constant for indicating that the ship is turning counter-clockwise.
TURN_CW - Static variable in class dualroids.SpaceShip
A constant for indicating that the ship is turning clockwise.
TURN_NO - Static variable in class dualroids.SpaceShip
A constant for indicating that the ship is not turning.
turning - Variable in class dualroids.SpaceShip
Indicates turning state of the ship.

U

updateAsteroids(long) - Method in class dualroids.Server
Updates the fields of one asteroid at time and checks whether there are asteroids left.
updateLocationAndAngle(long) - Method in class dualroids.Asteroid
Updates the location and angle of this asteroid to the values corresponding to a moment in time given as the argument.
updateScoreBoard() - Method in class dualroids.ClientModelConnector
Sends the score board information to space area and marks a need for update.
updateScoreBoard(String, String, String, String, String, String) - Method in class dualroids.SpaceArea
Updates player names, number of ships and current score.
updateState(long) - Method in class dualroids.SpaceShip
Updates the state of this ship to the values corresponding to a moment in time given as the argument.
updateTransformation(long) - Method in class dualroids.SpaceShip
A helper method for updating the transormation.

V

velocityX - Variable in class dualroids.SpatialObject
The x component of the valocity of the spatial object at the moment indicated by timestamp.
velocityY - Variable in class dualroids.SpatialObject
The y component of the valocity of the spatial object at the moment indicated by timestamp.
vertices - Variable in class dualroids.SpaceShip
An array holding the untranslated vertices of the ship polygon.
vertices - Variable in class dualroids.Asteroid
An array for storing the coordinates of the vertices of this asteroid.
visible - Variable in class dualroids.Asteroid
A boolean indicating whether the asteroid is visible.

W

WIDTH - Static variable in class dualroids.Arena
Constant for the width of the arena.
WINDOW_HEIGHT - Static variable in class dualroids.SpaceArea
Height of the displayable area.
WINDOW_WIDTH - Static variable in class dualroids.SpaceArea
Width of the displayable area.
windowClosing(WindowEvent) - Method in class dualroids.InputHandler
Clean up the window and initiate a network close procedure when the window close event is made.
writeArena(Arena) - Method in class dualroids.ServerModelConnector
Sends the whole Arena object to the client
writeAsteroidLocationAndAngle(int, double, double, double, long) - Method in class dualroids.ServerModelConnector
Tells the client the location and angle of asteroid number index
writeBlowUpAsteroid(int, double, double, long) - Method in class dualroids.ServerModelConnector
Tells the client to blow up asteroid number index
writeBlowUpShip(int, long) - Method in class dualroids.ServerModelConnector
Tells the client that the ship at shipIndex has blown up.
writeBulletFired(int, double, double, double, double, double, double, long, long) - Method in class dualroids.ClientModelConnector
Tells the server that a bullet has been fired by the ship controlled by this client.
writeGameOver() - Method in class dualroids.ServerModelConnector
A public method for initiating the game over procedure from outside this connector
writeInitBullet(int, int, double, double, double, double, double, double, long, long) - Method in class dualroids.ServerModelConnector
Tells the client that a bullet has been fired by the ship controlled by the other client.
writeInvalidateBullet(int, int) - Method in class dualroids.ServerModelConnector
Marks a bullet non-flying (not visible).
writeObject(ObjectOutputStream) - Method in class dualroids.SpaceShip
Serializes the ship for sending to the clients.
writeObject(ObjectOutputStream) - Method in class dualroids.Asteroid
Serializes the asteroid for sending to the clients.
writePlayerName(int, String) - Method in class dualroids.ServerModelConnector
Write the given playerName of the given shipIndex.
writePlayerName(String) - Method in class dualroids.ClientModelConnector
Write this client's playerName
writeScore(int, int) - Method in class dualroids.ServerModelConnector
Inform the client of the new scores of a player.
writeShipsLeft(int, int) - Method in class dualroids.ServerModelConnector
Tells the client the number of ships a player has left.
writeShipState(double, double, double, double, double, long) - Method in class dualroids.ClientModelConnector
Sends the state of the space ship to the server.
writeShipState(int, double, double, double, double, double, long) - Method in class dualroids.ServerModelConnector
Sends the state of the space ship to the client.
writeToConnector() - Method in class dualroids.SpaceShip
Writes the state of ship to the registered ClientModelConnector
writeToConnector(int, ClientModelConnector) - Method in class dualroids.Bullet
Writes the state of the bullet to a ClientModelConnector
writeToConnector(int, ServerModelConnector) - Method in class dualroids.Asteroid
Writes the state of this asteroid to a ServerModelConnector.

A B C D E F G H I K L M N O P R S T U V W

Dualroids was written by Oskar Ojala, Yrjö Kari-Koskinen and Henri Sivonen