Input/Output
Input(s) Output(s)
Mouse:
Clicking the squares button to put X or O
Clicking the button reset to restart the game
Clicking the button for high scores (if added)
Keyboard:
Entering name for high scores (if added)
Monitor:
Buttons for squares and symbol
Button for restart
Present score
Visual tic tac toe
Button for how to play
Game Layout
Main Screen
*500 X 500 Applet
Player 1 Player 2
High Score Screen (if added)
*500 X 500 Applet
High Scores Name Win/lose Selena 3/2 _ _ _ _
Other Screen
When the ? button is pressed, a message that indicates how to play the game will appear.
The players put a X/O on one of the 9 squares on each turn to try and form a line of 3 X/O. The player that first complete 3 squares in a row, column or diagonal using X/O wins.
Structure and Components
Buttons for Tic Tac Toe
Declare each button from 1-9” Example: Private JButton button1 = new JButton(“”); Private JButton button2 = new JButton(“”); Private JButton button3 = new JButton(“”); Private JButton button4 = new JButton(“”); Private JButton button5 = new JButton(“”); Private JButton button6 = new JButton(“”); Private JButton button7 = new JButton(“”); Private JButton button8 = new JButton (“”); Private JButton button9 = new JButton (“”);
Action Performed for Buttons
(Calculate