public class Camera
extends java.lang.Object
implements java.lang.Runnable
Modifier and Type | Class and Description |
---|---|
class |
Camera.DetectedObject
represents an object that has been detected by the camera
|
Constructor and Description |
---|
Camera(GameSpecification specs)
construct a new camera controller, it will also construct a camera control window.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
close all the camera-related stuff
|
void |
msgToUser(java.lang.String msg)
appends a new message to the camera control panel window - a gateway for camera player
|
void |
requestObjectsFromCamera()
sends a command to the C++ application to make a snapshot
of the current game situation and send a list of detected objects
|
void |
run()
the communicating thread - blocking reads from the C++ application
and processes the received packets
|
java.util.ArrayList<Camera.DetectedObject> |
waitForUserMove()
the camera player indicates to the camera object by calling this blocking
method that it is interested in obtaining the current state of the game
from the camera immediately
|
public Camera(GameSpecification specs)
public void run()
run
in interface java.lang.Runnable
public void requestObjectsFromCamera()
public java.util.ArrayList<Camera.DetectedObject> waitForUserMove()
public void msgToUser(java.lang.String msg)
public void close()