(Coding in Java) (PLEASE PROVIDE A CODE THAT RUNS, PRINTS THE BOARD, HAS A
CONSOLE UI CLASS AND MEETS ALL OR AT LEAST MOST OF THE REQUIREMENTS.
THANK YOU.) (AND IF YOU CAN CREATE A UML CLASS DIAGRAM) Design and code an
Omok application that takes all user inputs from the standard input (System.in) and displays all
outputs to the standard output (System.out). Omok (a.k.a. Gomoku and Gobang), literally meaning
five pieces, is a two-player strategy game typically played with go pieces --- black and white
stones --- on a go board with 15x15 intersections (or places) [Wikipedia]. It is also possible to play
the game with paper and pencils because stones, once placed, can't be moved or removed from
the board. The two players alternate and place a stone of their color on an empty intersection. The
game objective is to put one's stones in a row of five consecutive places vertically, horizontally, or
diagonally. The winner is the first player to create an unbroken row of five stones. Your application
shall meet the following requirements. R1. The application shall take all user inputs from the
standard input (System.in) and display all output to the standard output (System.out). R2. The
application shall provide two different game modes: human game and strategy game. In the first
game mode, two human players play against each other, and in the second, a human player plays
against the computer. Your application shall provide a realistic or reasonable playing strategy for
the computer. Minimally, it should detect a winning/losing row, e.g., four consecutive stones with
an open end. R3. The game board shall consist of n*n intersections (or places) on which stones of
the players are placed, where n >= 15. R4. The application shall provide a way for the user to
select the game mode (see R2 above). R5. The application shall provide a way for the user to
place his or her stone in an empty intersection (or place) of the board. R6. The application shall
show the progress of a game by displaying the current configuration of the board -- all the stones
placed -- along with other status information, e.g., a player's turn. Consider using an ASCII
drawing to show the board configuration. R7. When the game ends, the application shall display
the outcome of the game --- a win or draw --- and highlight the winning row. R8. The application
shall provide a way to quit the game, e.g., by entering a special input value. R9. You shall
separate your user interface (UI) code from the model code that performs the game logic. The
model code should not depend on the UI code. We suggest you create a separate class for the UI,
say ConsoleUI, and make the model code independent of the UI class. That is, the UI code may
depend on the model code, but not the other way around. Note you will reuse your model code in
later assignments but not the UI code. 1. Code your design by naming your main (or entry point)
class as Main. 2. (Bonus: 10+ points) Implement a "cheat" mode and provide .
Coding in Java PLEASE PROVIDE A CODE THAT RUNS PRINTS T.pdf
1. (Coding in Java) (PLEASE PROVIDE A CODE THAT RUNS, PRINTS THE BOARD, HAS A
CONSOLE UI CLASS AND MEETS ALL OR AT LEAST MOST OF THE REQUIREMENTS.
THANK YOU.) (AND IF YOU CAN CREATE A UML CLASS DIAGRAM) Design and code an
Omok application that takes all user inputs from the standard input (System.in) and displays all
outputs to the standard output (System.out). Omok (a.k.a. Gomoku and Gobang), literally meaning
five pieces, is a two-player strategy game typically played with go pieces --- black and white
stones --- on a go board with 15x15 intersections (or places) [Wikipedia]. It is also possible to play
the game with paper and pencils because stones, once placed, can't be moved or removed from
the board. The two players alternate and place a stone of their color on an empty intersection. The
game objective is to put one's stones in a row of five consecutive places vertically, horizontally, or
diagonally. The winner is the first player to create an unbroken row of five stones. Your application
shall meet the following requirements. R1. The application shall take all user inputs from the
standard input (System.in) and display all output to the standard output (System.out). R2. The
application shall provide two different game modes: human game and strategy game. In the first
game mode, two human players play against each other, and in the second, a human player plays
against the computer. Your application shall provide a realistic or reasonable playing strategy for
the computer. Minimally, it should detect a winning/losing row, e.g., four consecutive stones with
an open end. R3. The game board shall consist of n*n intersections (or places) on which stones of
the players are placed, where n >= 15. R4. The application shall provide a way for the user to
select the game mode (see R2 above). R5. The application shall provide a way for the user to
place his or her stone in an empty intersection (or place) of the board. R6. The application shall
show the progress of a game by displaying the current configuration of the board -- all the stones
placed -- along with other status information, e.g., a player's turn. Consider using an ASCII
drawing to show the board configuration. R7. When the game ends, the application shall display
the outcome of the game --- a win or draw --- and highlight the winning row. R8. The application
shall provide a way to quit the game, e.g., by entering a special input value. R9. You shall
separate your user interface (UI) code from the model code that performs the game logic. The
model code should not depend on the UI code. We suggest you create a separate class for the UI,
say ConsoleUI, and make the model code independent of the UI class. That is, the UI code may
depend on the model code, but not the other way around. Note you will reuse your model code in
later assignments but not the UI code. 1. Code your design by naming your main (or entry point)
class as Main. 2. (Bonus: 10+ points) Implement a "cheat" mode and provide a way to enable and
disable it --- e.g., entering a special value when prompted for the next move. In the cheat mode,
the application suggests the next move for the user. It should minimally detect a winning or losing
sequence, e.g., a row of four consecutive stones with an open end. TESTING Your code should
compile and run correctly with Java 10 or later versions.