|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--Helper
This class includes methods for handling communication between the player and the server.
| Constructor Summary | |
Helper()
|
|
| Method Summary | |
static java.lang.String[] |
GetInfo(java.lang.String filename)
Given the name of the file the server is communicating through decodes and returns the data of the file in an array, one element for each line. |
static int |
MoveCount(java.lang.String s)
Given a string of the form (setq move-count x) returns x as an int |
static void |
MoveToServer(aMove m)
Given an aMove, formats and sends a move message to the server. |
static void |
MoveToServer(java.util.LinkedList jmp)
Given a jump (LinkedList of Integers) formats and sends a jump message to the server. |
static boolean |
MyTurn(java.lang.String s)
Given a string of the form (setq whose-turn x), returns true if x is player, false otherwise. |
static int |
TimeLeft(java.lang.String s)
Given a string of the form (setq time-left x) returns x as an int |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public Helper()
| Method Detail |
public static java.lang.String[] GetInfo(java.lang.String filename)
public static boolean MyTurn(java.lang.String s)
public static int MoveCount(java.lang.String s)
public static int TimeLeft(java.lang.String s)
public static void MoveToServer(aMove m)
public static void MoveToServer(java.util.LinkedList jmp)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||