Class Mark
java.lang.Object
|
+--Mark
- public class Mark
- extends java.lang.Object
The Mark class represents a player's mark, which is assumed to be a single
character, and is used to mark the board for the game Tic Tac Toe.
Bugs: none known
Constructor Summary |
Mark(java.lang.String specifiedString)
Constructs a Mark object using the first character of the specified String. |
Method Summary |
boolean |
equals(Mark compareMark)
Determines if a mark is equal to the compareMark. |
java.lang.String |
toString()
Returns the mark as a String object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Mark
public Mark(java.lang.String specifiedString)
- Constructs a Mark object using the first character of the specified String.
- Parameters:
specifiedString
- the character for the mark
equals
public boolean equals(Mark compareMark)
- Determines if a mark is equal to the compareMark.
- Returns:
- returns true if this mark and compareMark are the same,
otherwise false is returned
toString
public java.lang.String toString()
- Returns the mark as a String object.
- Returns:
- the mark as a String
- Overrides:
- toString in class java.lang.Object