|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectBoardPoint
public class BoardPoint
A BoardPoint is a class that corresponds to a point on the game board.
| Constructor Summary | |
|---|---|
BoardPoint()
|
|
| Method Summary | |
|---|---|
static BoardPoint |
fromCoordinates(int x,
int y)
Factory method that returns a reference to a newly-allocated BoardPoint that corresponds to given column and row numbers. |
static BoardPoint |
fromString(java.lang.String s)
Factory method that returns a reference to a newly-allocated BoardPoint that corresponds to a given column and row designation. |
int |
getX()
Returns the column number of this BoardPoint, numbered from 0-9 inclusive. |
int |
getY()
Returns the row number of this BoardPoint, numbered from 0-9 inclusive. |
static boolean |
isValid(java.lang.String s)
Returns true if the string given represents a valid board coordinate. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BoardPoint()
| Method Detail |
|---|
public static BoardPoint fromString(java.lang.String s)
s - a string consisting of a letter from A through J followed by a number from 1 to 10
public static BoardPoint fromCoordinates(int x,
int y)
x - a row numbery - a row number
public static boolean isValid(java.lang.String s)
s -
public int getX()
public int getY()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||