Question
Design and code a graphical game using Java Swing that allows three players to play a simple board game. This game allows the players to
Design and code a graphical game using Java Swing that allows three players to play a simple board game. This game allows the players to take turns placing their mark on the 8x8 game board. The game is won by the player who successfully places 4 of their marks adjacent to one another in a straight line. The group of marks can be oriented vertically, horizontally or diagonally.
Design the form so that the players can pick the character that will indicate their squares on the game board. Do not allow players to play on the board until all three players have determined their character. For each players turn devise some method to show whose turn it happens to be and once they select an unused square the turn passes to the next player. Game play continues until any player has 4 adjacent squares or until the board is full. Have the game restart when you click on the start a new game button at the button of the grid.
Marks Criteria
1. GUI is designed well / allows the frame to be resizable with no adverse effects
2. Code follows conventions / commented appropriately / formatted nicely
3. Prevents players from selecting the same character
4. Only allows placement after all players have specified a character
5. Determines and indicates when a player has won.
BHARA MAR
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started