Skip to content

Instantly share code, notes, and snippets.

@Naomi-Dennis
Last active November 21, 2019 11:32
Show Gist options
  • Save Naomi-Dennis/f594a623bb59923e7e725778d065f1fd to your computer and use it in GitHub Desktop.
Save Naomi-Dennis/f594a623bb59923e7e725778d065f1fd to your computer and use it in GitHub Desktop.
interface Board{
public void render();
}
interface GameLogic{
public void startPlayerTurn();
public boolean winnerFound();
}
class GameCoordinator{
public void start(GameLogic chess, Board checkeredBoard){
while(!chess.winnerFound()){
checkeredBoard.render();
chess.startPlayerTurn();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment