Created
January 12, 2014 15:49
-
-
Save tarynsauer/8386268 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| abstract class AbstractPlayer implements Player { | |
| private String marker; | |
| private Player opponent; | |
| public String getMarker() { | |
| return marker; | |
| } | |
| public Player getOpponent() { | |
| return opponent; | |
| } | |
| public void setOpponent(Player player) { | |
| this.opponent = player; | |
| } | |
| public AbstractPlayer(String marker) { | |
| this.marker = marker; | |
| } | |
| public void addMarker(Board board, int move) { | |
| int cellIndex = move - 1; | |
| board.cells[cellIndex] = this.marker; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment