Create a graphical interface and using the graphics class


Need help with a well commented java program tic tac toe game using below guidelines.

This must be implemented using Swing to create a graphical interface, and using the Graphics class for drawing the board, the markers, and line through the winning set of markers.

The design of the GUI is up to you, provided you have the following:

•a way for the user to select who goes first;

•a way for the user to select their marker ("X" or "O");

•a START button to begin the game;

•a way to indicate whose move it is, whether someone has won, and any other information you deem appropriate;

•a tic-tac-toe board drawn within the window;

•a way to detect mouse clicks inside the game board, and respond to them by drawing the user's marker in the selected square;

•a computer response when it is the computer's move;

•a way to automatically detect (and indicate on the game board) when someone has won; and

•a button to start a new game after the game ends. Additionally, you should do all necessary sanity checking during the game.

For example:

•the user should not be able to take two moves in a row without the computer moving in-between;

•the user should not be able to continue playing after the game has ended;

•only marks in valid, empty squares are allowed; and so on.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Create a graphical interface and using the graphics class
Reference No:- TGS02872425

Expected delivery within 24 Hours