├── .gitignore ├── screenshot ├── about.PNG ├── play-with-pc.PNG ├── select-game.PNG ├── play-with-friend.PNG └── TicTacToe-photo-logo.jpg ├── src └── com │ └── houarizegai │ └── TicTacToc │ ├── images │ ├── logo.png │ ├── github.png │ ├── twitter.png │ ├── youtube.png │ └── facebook.png │ ├── AboutWindow.java │ ├── MainWindow.java │ └── PlayWindow.java ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | out/ 3 | *.iml 4 | -------------------------------------------------------------------------------- /screenshot/about.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/screenshot/about.PNG -------------------------------------------------------------------------------- /screenshot/play-with-pc.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/screenshot/play-with-pc.PNG -------------------------------------------------------------------------------- /screenshot/select-game.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/screenshot/select-game.PNG -------------------------------------------------------------------------------- /screenshot/play-with-friend.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/screenshot/play-with-friend.PNG -------------------------------------------------------------------------------- /screenshot/TicTacToe-photo-logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/screenshot/TicTacToe-photo-logo.jpg -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/src/com/houarizegai/TicTacToc/images/logo.png -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/images/github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/src/com/houarizegai/TicTacToc/images/github.png -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/images/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/src/com/houarizegai/TicTacToc/images/twitter.png -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/images/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/src/com/houarizegai/TicTacToc/images/youtube.png -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/images/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/HouariZegai/TicTacToe/HEAD/src/com/houarizegai/TicTacToc/images/facebook.png -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Houari Zegai 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |  2 | # TicTacToe 🎮 3 | A simple tic tac toe game app. 4 | 5 | ## Used language 6 | * Java (Swing). 7 | 8 | ## How to play 9 | Select type of game: 10 | * With Friend 11 | * With Computer (PC) 12 | 1. Easy 13 | 2. Medium 14 | 3. Hard 15 | 16 | **PS:** (challange for you), You can not win the computer in the **Hard** case 😀. 17 | 18 | ## Screenshots 19 | Select game | About 20 | :-------------------------:|:-------------------------: 21 |  |  22 | 23 | Play with friend | Play with computer 24 | :-------------------------:|:-------------------------: 25 |  |  26 | 27 | 28 | ## Contributing 💡 29 | If you want to contribute to this project and make it better with new ideas, your pull request is very welcomed. 30 | If you find any issue just put it in the repository issue section, thank you. 31 | 32 | .سبحَانَكَ اللَّهُمَّ وَبِحَمْدِكَ، أَشْهَدُ أَنْ لا إِلهَ إِلأَ انْتَ أَسْتَغْفِرُكَ وَأَتْوبُ إِلَيْكَ 33 | -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/AboutWindow.java: -------------------------------------------------------------------------------- 1 | package com.houarizegai.TicTacToc; 2 | 3 | import javax.swing.*; 4 | import java.awt.*; 5 | import java.awt.event.MouseEvent; 6 | import java.awt.event.MouseListener; 7 | import java.net.URI; 8 | 9 | public class AboutWindow extends JDialog implements MouseListener { 10 | 11 | private static JLabel labelCopyRight; // This Label Using For Write Copy Right 12 | private static JLabel labelImg[]; // This Label Contain Image Of Social Media & Account About EasyCodeTeam 13 | private static JLabel labelLogo; // This Label Using For Display Logo Of My Team 14 | private final static String IMAGE_NAME[] = {"facebook", "twitter", "youtube", "github"}; // This Table Contain The Name Of My Icon Of Social Media , And Using To Import this Icon 15 | private final static int NUMBER_OF_IMAGES = IMAGE_NAME.length; 16 | 17 | public AboutWindow() { 18 | // load the image to a imageIcon & Import Icon From WorkSpace To Replace In This Label 19 | labelLogo = new JLabel(new ImageIcon(getClass().getResource("/com/houarizegai/TicTacToc/images/logo.png"))); 20 | labelLogo.setBounds(90, 60, 150, 150); // Set The Position , Height And Width Of The Label setBounds(x, y, Width, Height) 21 | this.add(labelLogo); // Add The Label To My About Window 22 | 23 | /* This Part Bellow For Change The Label Social Media */ 24 | 25 | labelImg = new JLabel[NUMBER_OF_IMAGES]; // Initialize The Table By Four JLabel 26 | for (int i = 0; i < NUMBER_OF_IMAGES; i++) { 27 | labelImg[i] = new JLabel(new ImageIcon(getClass().getResource("/com/houarizegai/TicTacToc/images/" + IMAGE_NAME[i] + ".png"))); 28 | labelImg[i].setBounds(90 + 40 * i, 290, 32, 32); 29 | labelImg[i].addMouseListener(this); 30 | this.add(labelImg[i]); // Add My Label Image To My About Window 31 | labelImg[i].setCursor(new Cursor(Cursor.HAND_CURSOR)); // If I Move The Cursor In The LabelImg Change The Cursor Design By Hand 32 | } 33 | 34 | /* This Part Bellow For Change The Label Of Copy Right */ 35 | 36 | labelCopyRight = new JLabel("Copyright Ⓒ EasyCodeTeam, All Right Reserved 2017."); // Create New Instance From JLabel & Set By Paragraph 37 | labelCopyRight.setBounds(15, 330, 300, 30); 38 | this.add(labelCopyRight); 39 | 40 | /* This Is Parameter For My About Window */ 41 | 42 | this.setBounds(400, 200, 330, 400); 43 | this.setTitle("About This App"); // Change The Title For My Window By This Value (in argument) 44 | this.setResizable(false); // You Can Not Change The Size Of My About Window 45 | this.setAlwaysOnTop(true); // I Put My About Window Always In Top 46 | this.setLayout(null); // Disable All Layout Because I Control The Position Of My Elements By The Function setBounds(x, y, Width, Height) 47 | this.setVisible(true); // Show The Window To My Screen 48 | } 49 | 50 | @Override 51 | public void mouseClicked(MouseEvent e) { 52 | for(int i = 0; i < labelImg.length; i++) 53 | if (e.getSource().equals(labelImg[i])) 54 | try { 55 | Desktop.getDesktop().browse(new URI("https://www." + IMAGE_NAME[i] + ".com/HouariZegai")); 56 | } catch (Exception ex) { 57 | 58 | } 59 | } 60 | 61 | @Override 62 | public void mousePressed(MouseEvent e) { 63 | 64 | } 65 | 66 | @Override 67 | public void mouseReleased(MouseEvent e) { 68 | 69 | } 70 | 71 | @Override 72 | public void mouseEntered(MouseEvent e) { 73 | 74 | } 75 | 76 | @Override 77 | public void mouseExited(MouseEvent e) { 78 | 79 | } 80 | 81 | 82 | public static void main(String[] args) { 83 | new AboutWindow().setVisible(true); 84 | } 85 | } -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/MainWindow.java: -------------------------------------------------------------------------------- 1 | package com.houarizegai.TicTacToc; 2 | 3 | import javax.swing.*; 4 | import java.awt.Font; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | 8 | 9 | public class MainWindow extends JFrame implements ActionListener{ 10 | 11 | private final JLabel labelSelect; // OutPut String In Screen 12 | private JLabel labelChoix; // Print String In Screen 13 | private final JButton btnWithFriend; // Button Play With Friend 14 | private final JButton btnWithPc; // Button Play With PC 15 | private final JButton btnAbout; // Button About This Application 16 | private JRadioButton choixWithPc[] = new JRadioButton[3]; // RadioButton Choix: 0:Easy, 1:Medium & :2Hard 17 | private boolean showHidePcPlay = false; // This Boolean Using For Show or Hide Choix 18 | private final Font FontForLabel = new Font("Comic Sans MS", Font.PLAIN, 16); // Create New Instance for Change this Value: Font(Font-Family, Font-Weight, Font-Size) 19 | private static int i = 0; // This Variable Using In Loop 20 | 21 | MainWindow() { 22 | 23 | labelSelect = new JLabel(PlayWindow.setColor("Please Select Type Of Game :", "blue")); // Create New Instance From JLabel & Add + Change The Color For The Text 24 | labelSelect.setBounds(20, 40, 315, 50); // Set The Position , Height And Width Of The Label setBounds(x, y, Width, Height) 25 | labelSelect.setFont(new Font("Comic Sans Ms", Font.PLAIN, 15)); // Change The Font : (Font-Family, Font-Weight, Font-Size) 26 | this.add(labelSelect); // Add The Label To My About Window 27 | 28 | btnWithFriend = new JButton("Play With My Friend"); 29 | btnWithFriend.setBounds(20, 100, 250, 50); 30 | btnWithFriend.setFont(FontForLabel); 31 | btnWithFriend.addActionListener(event -> { // If I Click This Button Call This Block To Execute 32 | new PlayWindow(0); // Create New Window From The Class PlayWithFriend 33 | this.setVisible(false); // Hide My Main Window 34 | }); 35 | this.add(btnWithFriend); 36 | 37 | btnWithPc = new JButton("Play With PC"); 38 | btnWithPc.setBounds(20, 160, 250, 50); 39 | btnWithPc.setFont(FontForLabel); 40 | btnWithPc.addActionListener(event -> { // If I Click To "With PC" Button Execute This Block ( Show Or Hide Choix & Resize The Main Window ) 41 | showHidePcPlay = (showHidePcPlay)? false : true; // Inverse The Value Of The Variable By True Or False 42 | labelChoix.setVisible(showHidePcPlay); // Show Or Hide The labelChoix 43 | for(i = 0; i < 3; i++) 44 | choixWithPc[i].setVisible(showHidePcPlay); // Show Or Hide The JRadioButton 45 | 46 | this.setSize(310, (showHidePcPlay)?450:270); 47 | }); 48 | this.add(btnWithPc); 49 | 50 | labelChoix = new JLabel(PlayWindow.setColor("Please Select Level :", "green")); 51 | labelChoix.setBounds(30, 220, 250, 50); 52 | labelChoix.setVisible(false); 53 | this.add(labelChoix); 54 | 55 | choixWithPc[0] = new JRadioButton("Easy"); 56 | choixWithPc[1] = new JRadioButton("Medium"); 57 | choixWithPc[2] = new JRadioButton("Hard"); 58 | 59 | for(int i = 0; i < 3; i++) { 60 | choixWithPc[i].setBounds(40, 260 + 30 * i, 150, 30); 61 | choixWithPc[i].setVisible(false); 62 | choixWithPc[i].addActionListener(this); 63 | this.add(choixWithPc[i]); 64 | } 65 | 66 | btnAbout = new JButton("About"); 67 | btnAbout.setBounds(200, 10, 70, 25); 68 | btnAbout.addActionListener(event -> { 69 | new AboutWindow(); 70 | }); 71 | this.add(btnAbout); 72 | 73 | setTitle("TicTacToc Game"); // Edit (Set) The Title Of My Main Window 74 | setBounds(400, 170, 310, 270); 75 | setLayout(null); // Disable All Layout Because I Control The Position Of My Elements By The Function setBounds(x, y, Width, Height) 76 | setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); // If I Click To The Close Button Stop Process 77 | setVisible(true); // Show The Window To The Screen 78 | setIconImage(new ImageIcon(getClass().getResource("/com/houarizegai/TicTacToc/images/logo.png")).getImage()); 79 | } 80 | 81 | @Override 82 | public void actionPerformed(ActionEvent e) { 83 | for(int i = 0; i < 3; i++) 84 | if(e.getSource() == choixWithPc[i]) { 85 | new PlayWindow(i+1); 86 | this.setVisible(false); 87 | } 88 | } 89 | 90 | public static void main(String[] args) { 91 | new MainWindow(); // Create New Instance (Window) From Main Class 92 | } 93 | } -------------------------------------------------------------------------------- /src/com/houarizegai/TicTacToc/PlayWindow.java: -------------------------------------------------------------------------------- 1 | package com.houarizegai.TicTacToc; 2 | 3 | import java.awt.Color; 4 | import java.awt.Font; 5 | import java.awt.event.ActionEvent; 6 | import java.awt.event.ActionListener; 7 | import java.util.Random; 8 | 9 | import javax.swing.JButton; 10 | import javax.swing.JFrame; 11 | import javax.swing.JLabel; 12 | import javax.swing.JOptionPane; 13 | 14 | public class PlayWindow extends JFrame implements ActionListener{ 15 | 16 | private JLabel TableOfScore; // Print Table Of Score 17 | private int xScore = 0; // This Value Is The Point Wined By X 18 | private int oScore = 0; // This Value Is The Point Wined By O 19 | private JButton buttonsXO[]; // This Button Using For Input XO 20 | private JButton btnReset; // This Button Using For Clear Screen & Reset Score 21 | private JButton btnClear; // This Button Using For Clean Screen 22 | private JButton btnBackToMain; // This Button Using For Back To The Main Window 23 | private final static int BUTTON_XO_WIDTH = 80; // The Width Of The Button XO 24 | private final static int BUTTON_XO_HEIGHT = 80; // The Height Of The Button XO 25 | private final static int POSITION_XO_H[] = {30, BUTTON_XO_WIDTH * 1 + 30, BUTTON_XO_WIDTH * 2 + 30, BUTTON_XO_WIDTH * 3 + 30}; // Dimension Of Button Horizontal 26 | private final static int POSITION_XO_V[] = {120, BUTTON_XO_WIDTH * 1 + 120, BUTTON_XO_WIDTH * 2 + 120, BUTTON_XO_WIDTH * 3 + 120 + 20}; // Dimontion Of Button Vertical & The Value 20 For Margin-Top 27 | private static int i = 0; // This Is Counter Using in Loop 28 | 29 | private final int CHOIX_LEVEL; 30 | /* This Constants Using For Check The Game If It Is WithFriend, Easy , Medium Or Hard */ 31 | private final int CHOIX_FRIEND = 0; 32 | private final int CHOIX_EASY = 1; 33 | private final int CHOIX_MEDIUM = 2; 34 | private final int CHOIX_HARD = 3; 35 | 36 | /* This Variables Using In Case Play With Friend */ 37 | private static boolean player1 = true; // This Variable Tell Me Witch Player Play Now 38 | 39 | /* This Variables Using In Case Play With PC Level Easy */ 40 | private static Random rand = new Random(); // Get Random Value 41 | private boolean printRand = true; // Check This Value if True Print XO For PC 42 | 43 | /* This Variables Using In Case Play With PC Level Medium OR Hard*/ 44 | private int arrayRows[] = new int[8]; // This Table is add : ( 1 For X ) And ( -1 For O ) 45 | private boolean mCenterFirst = false; 46 | private boolean mCornerFirst = false; 47 | private boolean mHvFirst = false; 48 | private boolean mHvAfterCorner = false; 49 | private boolean mCornerAfterHv = false; 50 | private boolean mCornerAfterCenter = false; 51 | private boolean mHvAfterHv = false; 52 | private int mCounter = 0; 53 | private boolean mCorner = false; 54 | private boolean mHvAfterCenter = false; 55 | 56 | PlayWindow(int CHOIX_LEVEL) { // CHOIX_LEVEL = 0:WithFriend, 1:Easy, 2:Medium, 3:Hard 57 | 58 | this.CHOIX_LEVEL = CHOIX_LEVEL; 59 | 60 | if (this.CHOIX_LEVEL == CHOIX_FRIEND) 61 | this.setTitle("Play With Friend"); 62 | else if (this.CHOIX_LEVEL == CHOIX_EASY) 63 | this.setTitle("Play With PC Easy"); 64 | else if (this.CHOIX_LEVEL == CHOIX_MEDIUM) 65 | this.setTitle("Play With PC Medium"); 66 | else 67 | this.setTitle("Play With PC Hard"); 68 | 69 | TableOfScore = new JLabel(""); 70 | printScore(xScore, oScore); // Print Format 71 | TableOfScore.setBounds(170, 10, 200, 100); // Dimension 72 | TableOfScore.setFont(new Font("Comic Sans MS", Font.PLAIN, 16)); // change Font Of Label ( FontFamily , FontWeight , FontSize ) 73 | this.add(TableOfScore); 74 | 75 | buttonsXO = new JButton[9]; 76 | 77 | for (i = 0; i < buttonsXO.length; i++) { // This Loop For Initialize & Modify The Size & Position Of The Button & Adding To The Screen 78 | buttonsXO[i] = new JButton(); 79 | if (i < 3) { 80 | buttonsXO[i].setBounds(POSITION_XO_H[i], POSITION_XO_V[0], BUTTON_XO_WIDTH, BUTTON_XO_HEIGHT); 81 | } else if (i < 6) { 82 | buttonsXO[i].setBounds(POSITION_XO_H[i - 3], POSITION_XO_V[1], BUTTON_XO_WIDTH, BUTTON_XO_HEIGHT); 83 | } else if (i < 9) { 84 | buttonsXO[i].setBounds(POSITION_XO_H[i - 6], POSITION_XO_V[2], BUTTON_XO_WIDTH, BUTTON_XO_HEIGHT); 85 | } 86 | 87 | buttonsXO[i].setFont(new Font("Comic Sans MS", Font.PLAIN, 26)); 88 | buttonsXO[i].setBackground(Color.WHITE); // Change The Color of The Button 89 | this.add(buttonsXO[i]); 90 | } 91 | for (i = 0; i < 9; i++) { 92 | buttonsXO[i].addActionListener(this); 93 | } 94 | 95 | btnReset = new JButton("Reset"); 96 | btnReset.setBounds(POSITION_XO_H[0], POSITION_XO_V[3], BUTTON_XO_WIDTH * 3 / 2 - 10, 40); 97 | btnReset.setFont(new Font("Comic Sans MS", Font.PLAIN, 16)); 98 | btnReset.addActionListener(event -> { 99 | clear(); 100 | resetScore(); 101 | }); 102 | this.add(btnReset); 103 | 104 | btnClear = new JButton("Clear"); 105 | btnClear.setBounds(POSITION_XO_H[0] + btnReset.getWidth() + 20, POSITION_XO_V[3], BUTTON_XO_WIDTH * 3 / 2 - 10, 40); 106 | btnClear.setFont(new Font("Comic Sans MS", Font.PLAIN, 16)); 107 | btnClear.addActionListener(event -> { 108 | clear(); 109 | }); 110 | this.add(btnClear); 111 | 112 | btnBackToMain = new JButton("Back To Main"); 113 | btnBackToMain.setBounds(POSITION_XO_H[0], POSITION_XO_V[3] + 50, BUTTON_XO_WIDTH * 3, 40); 114 | btnBackToMain.setFont(new Font("Comic Sans MS", Font.PLAIN, 16)); 115 | btnBackToMain.addActionListener(event -> { 116 | this.setVisible(false); 117 | new MainWindow(); 118 | }); 119 | add(btnBackToMain); 120 | 121 | this.setBounds(400, 170, buttonsXO[0].getWidth() * 3 + 75, TableOfScore.getHeight() + buttonsXO[0].getHeight() * 3 + btnReset.getHeight() + btnBackToMain.getHeight() + 120); 122 | this.setLayout(null); 123 | this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 124 | this.setVisible(true); 125 | } 126 | 127 | @Override 128 | public void actionPerformed(ActionEvent e){ 129 | 130 | if (CHOIX_LEVEL == CHOIX_FRIEND) { 131 | for(i = 0; i < 9; i++){ 132 | if (e.getSource().equals(buttonsXO[i])) // If ButtonsXO[i] Is Clicked ? 133 | printXOForFriend(i); // Fill The ButtonXO In The Index i By X Or O 134 | } 135 | }else if (CHOIX_LEVEL == CHOIX_EASY) { 136 | for (i = 0; i < 9; i++) { 137 | if (e.getSource() == buttonsXO[i]) 138 | printXOForEasy(i); 139 | } 140 | }else if (CHOIX_LEVEL == CHOIX_MEDIUM) { 141 | for (i = 0; i < 9; i++) 142 | if (e.getSource() == buttonsXO[i]){ 143 | if (buttonsXO[i].getText().equals("")) { 144 | printXOForMeMedium(i); 145 | 146 | if(getResult(true)) { 147 | printXOForPcMedium(); 148 | getResult(false); 149 | } 150 | } 151 | } 152 | }else if (CHOIX_LEVEL == CHOIX_HARD) { 153 | for (i = 0; i < 9; i++) 154 | if (e.getSource() == buttonsXO[i]){ 155 | if (buttonsXO[i].getText().equals("")) { 156 | printXOForMeHard(i); 157 | 158 | if(getResult(true)) { 159 | printXOForPcHard(); 160 | getResult(false); 161 | } 162 | } 163 | } 164 | } 165 | 166 | } 167 | 168 | /* This Function Bellow Using In All Play Case */ 169 | 170 | private void printScore(int x, int o) { // This Function For Modify Table of Score 171 | String xFormat = setColorOnly(String.valueOf(x), "green"), 172 | oFormat = setColorOnly(String.valueOf(o), "green"); 173 | if (x > o) { 174 | xFormat = setColorOnly(String.valueOf(x), "green"); 175 | oFormat = setColorOnly(String.valueOf(o), "red"); 176 | } else if (x < o) { 177 | xFormat = setColorOnly(String.valueOf(x), "red"); 178 | oFormat = setColorOnly(String.valueOf(o), "green"); 179 | } 180 | 181 | String p1 = "You"; 182 | String p2 = "Pc"; 183 | 184 | if (CHOIX_LEVEL == CHOIX_FRIEND) { 185 | p1 = "X"; 186 | p2 = "O"; 187 | } 188 | 189 | TableOfScore.setText("
| Score : | |
|---|---|
| "+ p1 + " | " + xFormat + " |
| "+ p2 + " | " + oFormat + " |