-
-
Save sQuark23/20816bd48ee50aea6f78ab9569cb8fbd to your computer and use it in GitHub Desktop.
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
package com.pojavan.lesson06.methods; | |
import com.pojavan.lesson06.methods.game.board.Board; | |
import com.pojavan.lesson06.methods.game.game.Game; | |
import com.pojavan.lesson06.methods.game.game.GameForTwoPlayers; | |
import com.pojavan.lesson06.methods.game.game.TicTacToeGame; | |
class Main { | |
public static void main(String[] args) { | |
TicTacToeGame ticTacToe = new TicTacToeGame("Jack", "Peter"); | |
Board board = new Board(); | |
printGameAndBoard(ticTacToe, board); | |
final GameForTwoPlayers domino = new GameForTwoPlayers("Domino", "Player #1", "Player #2"); | |
printGameAndBoard(domino, board); | |
} | |
public static void printGameAndBoard(Game game, Board board) { | |
game.printGameName(); | |
System.out.println("===================="); | |
board.printBoard(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment