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.
-
bufferSize
- The size of the buffers in the system.
-
server
- Sends data over the network.
-
serverGoingOnline
- Data is done only once when the server is first online.
-
NetworkPlayerStrategy(Buffer, TextArea, Camera)
-
The strategy thread for the player.
-
bufferAvailable()
- A buffer is available for sending over the network.
-
buildBufferInfo()
- Send signal to build the buffer on the remote side.
-
custom()
- Startup the server.
-
flipperSpace()
- Send flipper's space.
-
flipperZone()
- Send flipper zone of image.
-
foundFlippers()
- Found flippers
-
height()
- Send height of image.
-
leftFlipperLocation()
- Send left flipper location.
-
objects()
- Send buffer's objects.
-
outZone()
- Send outzone of image.
-
playStatus()
- Send ball in play's status.
-
resetTime()
- Send flipper reset time.
-
rightFlipperLocation()
- Send right flipper location.
-
sendBlip()
- Send ball's location.
-
sendBuffInfo()
- Send buffer's information.
-
sendDefaultInfo()
- Send the default information to the client.
-
topBottom()
- Send top & bottom of play area.
-
transmitFrame()
- Send the frame from the camera.
server
protected MyServer server
- Sends data over the network.
serverGoingOnline
protected boolean serverGoingOnline
- Data is done only once when the server is first online.
bufferSize
protected int bufferSize
- The size of the buffers in the system.
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
custom
public void custom()
- Startup the server.
- Overrides:
- custom in class Strategy
bufferAvailable
public void bufferAvailable()
- A buffer is available for sending over the network.
- Overrides:
- bufferAvailable in class Strategy
sendDefaultInfo
private void sendDefaultInfo()
- Send the default information to the client.
playStatus
private void playStatus()
- Send ball in play's status.
flipperSpace
private void flipperSpace()
- Send flipper's space.
topBottom
private void topBottom()
- Send top & bottom of play area.
resetTime
private void resetTime()
- Send flipper reset time.
leftFlipperLocation
private void leftFlipperLocation()
- Send left flipper location.
rightFlipperLocation
private void rightFlipperLocation()
- Send right flipper location.
foundFlippers
private void foundFlippers()
- Found flippers
outZone
private void outZone()
- Send outzone of image.
flipperZone
private void flipperZone()
- Send flipper zone of image.
height
private void height()
- Send height of image.
sendBlip
private void sendBlip()
- Send ball's location.
transmitFrame
private void transmitFrame()
- Send the frame from the camera.
buildBufferInfo
private void buildBufferInfo()
- Send signal to build the buffer on the remote side.
sendBuffInfo
private void sendBuffInfo()
- Send buffer's information.
objects
private String objects()
- Send buffer's objects.
All Packages Class Hierarchy This Package Previous Next Index