Serialized Form


Package dualroids

Class dualroids.Arena implements Serializable

Serialized Fields

spaceShips

SpaceShip[] spaceShips
An array holding all the spaceships

asteroids

Asteroid[] asteroids
An array holding all the asteroids

levelStarts

long levelStarts
The starting time of the level.

Class dualroids.Asteroid implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Deserializes the asteroid on the client side.

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
Serializes the asteroid for sending to the clients.
Serialized Fields

angularVelocity

double angularVelocity
The angular velocity (radians per millisecond) of the asteroid.

size

int size
The size of the asteroid. SMALL, MEDIUM or LARGE

visible

boolean visible
A boolean indicating whether the asteroid is visible.

exploding

boolean exploding
A boolean indicating whether the asteroid is currently exploding (that is, whether debris is visible).

angle

double angle
The rotation angle (in radians) of the spatial object at the moment indicated by timestamp.

vertices

float[] vertices
An array for storing the coordinates of the vertices of this asteroid. The array is in the format accepted by AffineTransform: x0, y0, ... xn, yn.

Class dualroids.Bullet implements Serializable

Serialized Fields

translatableLocation

Point2D translatableLocation
The Point2D instance used for returning the translated location of the bullet

lineDeltaX

double lineDeltaX
The x difference of the between the center of bullet the end of the bullet line

lineDeltaY

double lineDeltaY
The y difference of the between the center of bullet the end of the bullet line

translatableLine

Line2D translatableLine
The Line2D instance used for returning the translated Shape representation of the bullet

expires

long expires
The moment in time when this bullet expires

Class dualroids.GameFrame implements Serializable

Class dualroids.GameOverException implements Serializable

Class dualroids.Runner implements Serializable

Serialized Fields

server

Server server
the server thread

client

Client client
the client thread

playerNameField

JTextField playerNameField
the field for player name in the main dialog

connectButton

JButton connectButton
the buttons in the main dialog

actButton

JButton actButton
the buttons in the main dialog

host

String host
the host name string

playerName

String playerName
the player name string

Class dualroids.SpaceArea implements Serializable

Serialized Fields

connector

ClientModelConnector connector
The connector to the client

player1

String player1
Name of player 1

player2

String player2
Name of player 2

score1

String score1
Score of player 1

score2

String score2
Score of player 2

ships1

String ships1
Number of ships player 1 has left

ships2

String ships2
Number of ships player 2 has left

bgImage

Image bgImage
The background image

scoreboardUpdated

boolean scoreboardUpdated
Toggles whether the score board has been updated

otherPlayerQuit

boolean otherPlayerQuit
Toggles whether other player has quit

gameOver

boolean gameOver
Toggles whether the game is over

hints

RenderingHints hints
Rendering hints for rendering asteroids, spaceships etc.

buffer1

BufferedImage buffer1
Background image buffer

buffer2

BufferedImage buffer2
Foreground image buffer, works best with accelerated graphics

arena

Arena arena
An arena object, which is used to fetch the shapes to draw

scoreHandler

HighScoreHandler scoreHandler
A high score-handler to save/load highscores

Class dualroids.SpaceShip implements Serializable

Serialization Methods

readObject

private void readObject(ObjectInputStream in)
                 throws IOException,
                        ClassNotFoundException
Deserializes the ship on the client side.

writeObject

private void writeObject(ObjectOutputStream out)
                  throws IOException
Serializes the ship for sending to the clients.
Serialized Fields

angle

double angle
The rotation angle (in radians) of the spatial object at the moment indicated by timestamp.

Class dualroids.SpatialObject implements Serializable

Serialized Fields

timestamp

long timestamp
The moment in game (server) time for which the other fields are valid.

locationX

double locationX
The x coordinate of the center of the spatial object at the moment indicated by timestamp.

locationY

double locationY
The y coordinate of the center of the spatial object at the moment indicated by timestamp.

velocityX

double velocityX
The x component of the valocity of the spatial object at the moment indicated by timestamp.

velocityY

double velocityY
The y component of the valocity of the spatial object at the moment indicated by timestamp.



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