Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void actionPerformed(ActionEvent e) {
- Control.incrementValue();// changes from X to O
- if (ok) { //to not override a cell
- switch (Control.getValue() % 2) {
- case 0:
- setIcon(X);
- value=0;
- break;
- case 1:
- setIcon(O);
- value=1;
- break;
- }
- ok = false;
- }
- if(Control.gameOver()){
- Control.endGame();
- }
- }
Add Comment
Please, Sign In to add comment