Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
CheckersAI/src/oldGameStates/Piece.java
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (19 sloc)
342 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Piece{ | |
//represents a game piece | |
char _token; | |
int _row; | |
int _col; | |
boolean _empty; | |
public Piece(char t, int r, int c) { | |
_token = t; | |
_row = r; | |
_col = c; | |
_empty = false; | |
} | |
public Piece(boolean empty){ | |
_empty = empty; | |
} | |
public Piece clone() { | |
return new Piece(_token, _row, _col); | |
} | |
} |