All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class pinball.player.network.NetworkPlayerStrategy

java.lang.Object
   |
   +----java.lang.Thread
           |
           +----pinball.player.Strategy
                   |
                   +----pinball.player.network.NetworkPlayerStrategy

public class NetworkPlayerStrategy
extends Strategy
The network player's strategy. This sends the location of the ball, and other data over to the client. This starts up the server.


Variable Index

 o bufferSize
The size of the buffers in the system.
 o server
Sends data over the network.
 o serverGoingOnline
Data is done only once when the server is first online.

Constructor Index

 o NetworkPlayerStrategy(Buffer, TextArea, Camera)
The strategy thread for the player.

Method Index

 o bufferAvailable()
A buffer is available for sending over the network.
 o buildBufferInfo()
Send signal to build the buffer on the remote side.
 o custom()
Startup the server.
 o flipperSpace()
Send flipper's space.
 o flipperZone()
Send flipper zone of image.
 o foundFlippers()
Found flippers
 o height()
Send height of image.
 o leftFlipperLocation()
Send left flipper location.
 o objects()
Send buffer's objects.
 o outZone()
Send outzone of image.
 o playStatus()
Send ball in play's status.
 o resetTime()
Send flipper reset time.
 o rightFlipperLocation()
Send right flipper location.
 o sendBlip()
Send ball's location.
 o sendBuffInfo()
Send buffer's information.
 o sendDefaultInfo()
Send the default information to the client.
 o topBottom()
Send top & bottom of play area.
 o transmitFrame()
Send the frame from the camera.

Variables

 o server
 protected MyServer server
Sends data over the network.

 o serverGoingOnline
 protected boolean serverGoingOnline
Data is done only once when the server is first online.

 o bufferSize
 protected int bufferSize
The size of the buffers in the system.

Constructors

 o NetworkPlayerStrategy
 public NetworkPlayerStrategy(Buffer buffer,
                              TextArea gameStats,
                              Camera camera)
The strategy thread for the player.

Parameters:
buffer - the first buffer in the series of buffers for the system.
gameStats - the area to write the game stats to.
camera - the camera for the system

Methods

 o custom
 public void custom()
Startup the server.

Overrides:
custom in class Strategy
 o bufferAvailable
 public void bufferAvailable()
A buffer is available for sending over the network.

Overrides:
bufferAvailable in class Strategy
 o sendDefaultInfo
 private void sendDefaultInfo()
Send the default information to the client.

 o playStatus
 private void playStatus()
Send ball in play's status.

 o flipperSpace
 private void flipperSpace()
Send flipper's space.

 o topBottom
 private void topBottom()
Send top & bottom of play area.

 o resetTime
 private void resetTime()
Send flipper reset time.

 o leftFlipperLocation
 private void leftFlipperLocation()
Send left flipper location.

 o rightFlipperLocation
 private void rightFlipperLocation()
Send right flipper location.

 o foundFlippers
 private void foundFlippers()
Found flippers

 o outZone
 private void outZone()
Send outzone of image.

 o flipperZone
 private void flipperZone()
Send flipper zone of image.

 o height
 private void height()
Send height of image.

 o sendBlip
 private void sendBlip()
Send ball's location.

 o transmitFrame
 private void transmitFrame()
Send the frame from the camera.

 o buildBufferInfo
 private void buildBufferInfo()
Send signal to build the buffer on the remote side.

 o sendBuffInfo
 private void sendBuffInfo()
Send buffer's information.

 o objects
 private String objects()
Send buffer's objects.


All Packages  Class Hierarchy  This Package  Previous  Next  Index