Skip to content

In that game I used JFrame, JPanel, JButton and JLabel

Notifications You must be signed in to change notification settings

AbdusamidDev/TicTacToeGameJava

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TicTacToeGameJava

In that game I used JFrame, JPanel, JButton, JLabel and Thread

Source Code Of When O Wins!

public void oWins(int a, int b, int c)`
buttons[a].setBackground(Color.green);`
buttons[b].setBackground(Color.green);`
buttons[c].setBackground(Color.green);`
for (int i = 0; i < 9; i++) {         `
  buttons[i].setEnabled(false);       `
}                                     `
textField.setText("O Wins");          `                           
}                                     `

Source Code Of When X Wins!

public void xWins(int a, int b, int c)`
buttons[a].setBackground(Color.green);`
buttons[b].setBackground(Color.green);`
buttons[c].setBackground(Color.green);`
for (int i = 0; i < 9; i++) {         `
  buttons[i].setEnabled(false);       `
}                                     `
textField.setText("X Wins");          `
}                                     `

image image image

About

In that game I used JFrame, JPanel, JButton and JLabel

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages