Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 16 of 16

Thread: Tic Tac Toe

  1. #1
    Junior Member
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Tic Tac Toe

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
     
    public class Q implements ActionListener
     {
        /*Instance Variables*/
        private JFrame window = new JFrame("Tic-Tac-Toe");
        private JButton button1 = new JButton("1");
        private JButton button2 = new JButton("2");
        private JButton button3 = new JButton("3");
        private JButton button4 = new JButton("4");
        private JButton button5 = new JButton("5");
        private JButton button6 = new JButton("6");
        private JButton button7 = new JButton("7");
        private JButton button8 = new JButton("8");
        private JButton button9 = new JButton("9");
     
        private String letter = "";
        public static int count = 0;
        public Q()
        	{
            [COLOR="#00FF00"]/*Create Window*/[/COLOR]
            window.setSize(300,300);
            window.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            window.setLayout(new GridLayout(3,3));
     
            [COLOR="#00FF00"]/*Add Buttons To The Window*/[/COLOR]
            window.add(button1);
            window.add(button2);
            window.add(button3);
            window.add(button4);
            window.add(button5);
            window.add(button6);
            window.add(button7);
            window.add(button8);
            window.add(button9);
     
            /*Add The Action Listener To The Buttons*/
            button1.addActionListener(this);
            button2.addActionListener(this);
            button3.addActionListener(this);
            button4.addActionListener(this);
            button5.addActionListener(this);
            button6.addActionListener(this);
            button7.addActionListener(this);
            button8.addActionListener(this);
            button9.addActionListener(this);
     
            /*Make The Window Visible*/
            window.setVisible(true);
    		setCount(1);
            String input = JOptionPane.showInputDialog("welcome  you will take X and computer wiil take O \n Please ENTER number you want to play ");
            int pawn = Integer.parseInt(input);
            if ( input.equals("1"))
            {
            	button1.setText("X");
                button1.setEnabled(false);
                //letter = "X";
            }
             else
             	if(input.equals("2"))
           	{
                 button2.setText("X");
                 button2.setEnabled(false);
            }
             else
             	if(input.equals("3"))
           	{
                 button3.setText("X");
                 button3.setEnabled(false);
            }
             else
             	if(input.equals("4"))
           	{
                 button4.setText("X");
                 button4.setEnabled(false);
            }
             else
             	if(input.equals("5"))
           	{
                button2.setText("X");
                button5.setEnabled(false);
            }
             else
             	if(input.equals("6"))
           	{
                 button6.setText("X");
                 button6.setEnabled(false);
            }
             else
             	if(input.equals("7"))
           	{
                 button7.setText("X");
                 button7.setEnabled(false);
            }
             else
             	if(input.equals("8"))
           	{
                 button8.setText("X");
                 button8.setEnabled(false);
            }
             else
             	if(input.equals("9"))
           	{
                 button9.setText(letter);
                 button9.setEnabled(false);
            }
            else
            {
            	JOptionPane.showInputDialog("Sorry invalid number entered Please enter a number from 1 to 9 \n Press enter to procced ");
            }
        }
     
        public static void setCount (int co)
        {
            count = co;
        }
     
        public void actionPerformed(ActionEvent a)
        	{
            count++;
     
            /*Calculate Who's Turn It Is*/
            while(count == 2 || count == 4 || count == 6 || count == 8 || count == 10)
     
            	{
                String input = JOptionPane.showInputDialog("welcome  you will take X and computer wiil take O \n Please ENTER number you want to play ");
            int pawn = Integer.parseInt(input);
            if ( input.equals("1"))
            {
            	button1.setText("X");
                button1.setEnabled(false);
                //letter = "X";
            }
             else
             	if(input.equals("2"))
           	{
                 button2.setText("X");
                 button2.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button3.setText("X");
                 button3.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button4.setText("X");
                 button4.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                button2.setText(letter);
                button5.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button6.setText("X");
                 button6.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button7.setText("X");
                 button7.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button8.setText("X");
                 button8.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button9.setText(letter);
                 button9.setEnabled(false);
            }
            else
            {
            	JOptionPane.showInputDialog("Sorry invalid number entered Please enter a number from 1 to 9 \n Press enter to procced ");
            }//letter = "X";
     
            } //else
            		if(count == 1|| count == 3 || count == 7 || count == 9 || count == 11)
            {
                int ran = 1 + (int)(Math.random() * 9);
     
                 if (ran==1)
            {
            	button1.setText("O");
                button1.setEnabled(false);
                //letter = "X";
            }
             else
             	if(ran==2)
           	{
                 button2.setText("O");
                 button2.setEnabled(false);
            }
             else
             	if(ran==3)
           	{
                 button3.setText("0");
                 button3.setEnabled(false);
            }
             else
             	if(ran==4)
           	{
                 button4.setText("0");
                 button4.setEnabled(false);
            }
             else
             	if(ran==5)
           	{
                button5.setText("0");
                button5.setEnabled(false);
            }
             else
             	if(ran==6)
           	{
                 button6.setText("O");
                 button6.setEnabled(false);
            }
             else
             	if(ran==7)
           	{
                 button7.setText("X");
                 button7.setEnabled(false);
            }
             else
             	if(ran==8)
           	{
                 button8.setText("X");
                 button8.setEnabled(false);
            }
             else
             	if(ran==9)
           	{
                 button9.setText(letter);
                 button9.setEnabled(false);
            }//letter = "O";
            }
     
            /*Display X's or O's on the buttons*/
            if(a.getSource() == button1)
           	{
                button1.setText(letter);
                button1.setEnabled(false);
            }
            	else
            		if(a.getSource() == button2)
            {
                button2.setText(letter);
                button2.setEnabled(false);
            }
             else
             	if(a.getSource() == button3){
                button3.setText(letter);
                button3.setEnabled(false);
            }
             else
             	if(a.getSource() == button4){
                 button4.setText(letter);
                 button4.setEnabled(false);
            }
             else if(a.getSource() == button5)
            {
                 button5.setText(letter);
                 button5.setEnabled(false);
            }
             else if(a.getSource() == button6)
             {
                 button6.setText(letter);
                 button6.setEnabled(false);
            }
             else
             	 if(a.getSource() == button7)
            {
                 button7.setText(letter);
                 button7.setEnabled(false);
            }
             else
             	if(a.getSource() == button8)
            {
                 button8.setText(letter);
                 button8.setEnabled(false);
            }
             else
             	if(a.getSource() == button9)
           	{
                 button9.setText(letter);
                 button9.setEnabled(false);
            }
        }
     
        public static void main(String[] args)
        {
                new Q();
        }
    }
    Guys this how can i place an O automatically in a position that a omputer will generate?
    Last edited by jps; September 3rd, 2013 at 03:48 PM. Reason: fixed code tag


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Tic Tac Toe

    Please edit your post and wrap your code with code tags:
    [code=java]
    <YOUR CODE HERE>
    [/code]
    to get highlighting and preserve formatting.
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,166
    My Mood
    Hungover
    Thanks
    141
    Thanked 597 Times in 512 Posts

    Default Re: Tic Tac Toe

    Quote Originally Posted by njabulongcobo7 View Post
    Guys this how can i place an O automatically in a position that a omputer will generate?[/COLOR]
    What have you tried? Which part of this is giving you trouble? Break your problem down into smaller steps, focus on a single step (with an SSCCE), and we'll go from there.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  4. #4
    Junior Member
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Tic Tac Toe

    int ran = 1 + (int)(Math.random() * 9);

    if (ran==1)
    {
    button1.setText("O");
    button1.setEnabled(false);
    //letter = "X";
    }
    else
    if(ran==2)
    {
    button2.setText("O");
    button2.setEnabled(false);
    }
    else
    if
    (ran==3)
    {
    button3.setText("0");
    button3.setEnabled(false);
    }.....

    i coded this but buttons un the gui dont respond to it

  5. #5
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,166
    My Mood
    Hungover
    Thanks
    141
    Thanked 597 Times in 512 Posts

    Default Re: Tic Tac Toe

    Like we said, code you post should use the highlight tags. And it should also be in the form of an SSCCE. Posting a snippet is too little, posting your entire project is too much.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  6. #6
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Tic Tac Toe

    I see some problems in the code:
    1) The copy and paste of statements were not fixed:
          else
             	if(input.equals("X"))
           	{
                 button3.setText("X");
                 button3.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button4.setText("X");
                 button4.setEnabled(false);
            }
             else
             	if(input.equals("X"))
    The too many repeated tests for equal to X

    2)The nested code is not properly indented making the code hard to read:
           while(count == 2 || count == 4 || count == 6 || count == 8 || count == 10)
     
            	{
    //*******>>>> FOLLOWING CODE SHOULD BE INDENTED <<<<<<<<<<<<<<<<<<<***
                String input = JOptionPane.showInputDialog("welcome  you will take X and computer wiil take O \n Please ENTER number you want to play ");
            int pawn = Integer.parseInt(input);
            if ( input.equals("1"))
            {
            	button1.setText("X");
                button1.setEnabled(false);
                //letter = "X";
    If you don't understand my answer, don't ignore it, ask a question.

  7. #7
    Junior Member
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Tic Tac Toe

    basiclly this method is placing Xs and Os in the gui...

    public void actionPerformed(ActionEvent a)
        	{
            count++;
     
            /*Calculate Who's Turn It Is*/
            if(count == 2 || count == 4 || count == 6 || count == 8 || count == 10)
     
            	{
                String input = JOptionPane.showInputDialog("welcome  you will take X and computer wiil take O \n Please ENTER number you want to play ");
            	int pawn = Integer.parseInt(input);
     
            	if ( input.equals("1"))
            {
            	button1.setText("X");
                button1.setEnabled(false);
     
            }
             else
             	if(input.equals("2"))
           	{
                 button2.setText("X");
                 button2.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button3.setText("X");
                 button3.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button4.setText("X");
                 button4.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                button2.setText(letter);
                button5.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button6.setText("X");
                 button6.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button7.setText("X");
                 button7.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button8.setText("X");
                 button8.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button9.setText(letter);
                 button9.setEnabled(false);
            }
            else
            {
            	JOptionPane.showInputDialog("Sorry invalid number entered Please enter a number from 1 to 9 \n Press enter to procced ");
            }
     
            } 
            	else	if(count == 1|| count == 3 || count == 7 || count == 9 || count == 11)
            	{
     
    		   int ran = 1 + (int)(Math.random() * 9);
     
    		             if (ran==1)
    		        {
    		        	button1.setText("O");
    		            button1.setEnabled(false);
    		            //letter = "X";
    		        }
    		         else
    		         	if(ran==2)
    		       	{
    		             button2.setText("O");
    		             button2.setEnabled(false);
    		        }
    		         else
    		         	if(ran==3)
    		       	{
    		             button3.setText("0");
    		             button3.setEnabled(false);
    		        }
    		         else
    		         	if(ran==4)
    		       	{
    		             button4.setText("0");
    		             button4.setEnabled(false);
    		        }
    		         else
    		         	if(ran==5)
    		       	{
    		            button5.setText("0");
    		            button5.setEnabled(false);
    		        }
    		         else
    		         	if(ran==6)
    		       	{
    		             button6.setText("O");
    		             button6.setEnabled(false);
    		        }
    		         else
    		         	if(ran==7)
    		       	{
    		             button7.setText("X");
    		             button7.setEnabled(false);
    		        }
    		         else
    		         	if(ran==8)
    		       	{
    		             button8.setText("X");
    		             button8.setEnabled(false);
    		        }
    		         else
    		         	if(ran==9)
    		       	{
    		             button9.setText(letter);
    		             button9.setEnabled(false);
    		        }
    now my problem is that iit does nt place the Os

    --- Update ---

    basiclly this method is placing Xs and Os in the gui...

    public void actionPerformed(ActionEvent a)
        	{
            count++;
     
            /*Calculate Who's Turn It Is*/
            if(count == 2 || count == 4 || count == 6 || count == 8 || count == 10)
     
            	{
                String input = JOptionPane.showInputDialog("welcome  you will take X and computer wiil take O \n Please ENTER number you want to play ");
            	int pawn = Integer.parseInt(input);
     
            	if ( input.equals("1"))
            {
            	button1.setText("X");
                button1.setEnabled(false);
     
            }
             else
             	if(input.equals("2"))
           	{
                 button2.setText("X");
                 button2.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button3.setText("X");
                 button3.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button4.setText("X");
                 button4.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                button2.setText(letter);
                button5.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button6.setText("X");
                 button6.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button7.setText("X");
                 button7.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button8.setText("X");
                 button8.setEnabled(false);
            }
             else
             	if(input.equals("X"))
           	{
                 button9.setText(letter);
                 button9.setEnabled(false);
            }
            else
            {
            	JOptionPane.showInputDialog("Sorry invalid number entered Please enter a number from 1 to 9 \n Press enter to procced ");
            }
     
            } 
            	else	if(count == 1|| count == 3 || count == 7 || count == 9 || count == 11)
            	{
     
    		   int ran = 1 + (int)(Math.random() * 9);
     
    		             if (ran==1)
    		        {
    		        	button1.setText("O");
    		            button1.setEnabled(false);
    		            //letter = "X";
    		        }
    		         else
    		         	if(ran==2)
    		       	{
    		             button2.setText("O");
    		             button2.setEnabled(false);
    		        }
    		         else
    		         	if(ran==3)
    		       	{
    		             button3.setText("0");
    		             button3.setEnabled(false);
    		        }
    		         else
    		         	if(ran==4)
    		       	{
    		             button4.setText("0");
    		             button4.setEnabled(false);
    		        }
    		         else
    		         	if(ran==5)
    		       	{
    		            button5.setText("0");
    		            button5.setEnabled(false);
    		        }
    		         else
    		         	if(ran==6)
    		       	{
    		             button6.setText("O");
    		             button6.setEnabled(false);
    		        }
    		         else
    		         	if(ran==7)
    		       	{
    		             button7.setText("X");
    		             button7.setEnabled(false);
    		        }
    		         else
    		         	if(ran==8)
    		       	{
    		             button8.setText("X");
    		             button8.setEnabled(false);
    		        }
    		         else
    		         	if(ran==9)
    		       	{
    		             button9.setText(letter);
    		             button9.setEnabled(false);
    		        }
    now my problem is that iit does nt place the Os

  8. #8
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Tic Tac Toe

    Try debugging the code by adding several println() statements that print out messages when methods are executed and also print out the values of variables as they are used and changed.
    For example print out a message at the start of each method.
    Print out the value of the count variable as it is changed and every where its value is tested.
    The printout will show you what the program is doing and help you understand why the program executes like it does.

    Did you read post#6? The new code has the same problems:
      else
             	if(input.equals("X"))
           	{
    If you don't understand my answer, don't ignore it, ask a question.

  9. #9
    Member
    Join Date
    Sep 2013
    Posts
    70
    Thanks
    1
    Thanked 13 Times in 13 Posts

    Default Re: Tic Tac Toe

    Looking through your code there is a lot of repetition along with some issues already mentioned by Norm in post #6. You might want to take KevinWorkman advice in post #3 and break it down into smaller steps.

    For example:
    1. Start by understanding what the code does.
    -How does Random work?
    -What are the variables you create suppose to do?
    -Are they gonna be used to achieve something or just to hold data to display?
    Understanding what something does and how it can be used is a big factor in programming and it's efficiency.

    2. Create a small program that changes a string when something happens. For example pressing spacebar changes it from "On" to "Off".

    3. Create a program that uses Random numbers and learn how it works.

    4. Implement the random into your previous program. Instead of space bar changing the status of it have a random number change it's status or have it display the random numbers.

    Breaking down a program into small components really does help understand the program as a whole a lot better than tackling it head on. A lot of times as beginners we try to undertake a lot more than we can handle. Sometimes this helps push yourself beyond your limit but more often than not we are faced with obstacles that we can't easily overcome and can become discouraged.

    For now I'd recommend going back to basics and understanding them fully instead of adjusting code and hoping it runs and then getting frustrated because of the challenges you face.

  10. #10
    Junior Member
    Join Date
    Aug 2013
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Re: Tic Tac Toe

    i appreciate all advices but i feel you guys should look at what the question wants

    it says...
    Create a Tic Tac Toe game. In this game, two players alternate placing Xs and Os
    into a grid until one player has three matching symbols in a row, either horizontally,
    vertically, or diagonally. Create a game in which the user is presented with a threeby-
    three grid containing the digits 1 through 9. When the user chooses a position by
    typing a number, place an X in the appropriate spot. Generate a random number for
    the position where the computer will place an O. Do not allow the player or the
    computer to place a symbol where one has already been placed. Figure 9-26 shows
    the first four windows in a typical game. When either the player or computer has
    three symbols in a row, declare a winner; if all positions have been exhausted and no
    one has three symbols in a row, declare a tie. Save the game as TicTacToe.java.
    You are required to develop this game using NETBEANS as the interface.

    Due date: 12 September 2013

  11. #11
    Super Moderator jps's Avatar
    Join Date
    Jul 2012
    Posts
    2,642
    My Mood
    Daring
    Thanks
    90
    Thanked 262 Times in 231 Posts

    Default Re: Tic Tac Toe

    So exactly what is it you are stuck on?
    ..."now my problem is that iit does nt place the Os"... is not a question, and will likely get no answer.
    Beware that we do not provide code solutions here either.
    So we ask again, what is your question? ...and thanks for posting your assignment instructions, it is always helpful if your question is not exactly complete or clear.

  12. #12
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    SW Missouri
    Posts
    20,067
    Thanks
    47
    Thanked 2,146 Times in 2,119 Posts

    Default Re: Tic Tac Toe

    Have you tried debugging the program to see what it is doing when it executes? See post#6.
    If you don't understand my answer, don't ignore it, ask a question.

  13. #13
    Crazy Cat Lady KevinWorkman's Avatar
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    5,166
    My Mood
    Hungover
    Thanks
    141
    Thanked 597 Times in 512 Posts

    Default Re: Tic Tac Toe

    Quote Originally Posted by njabulongcobo7 View Post
    i appreciate all advices but i feel you guys should look at what the question wants

    it says...
    Create a Tic Tac Toe game. In this game, two players alternate placing Xs and Os
    into a grid until one player has three matching symbols in a row, either horizontally,
    vertically, or diagonally. Create a game in which the user is presented with a threeby-
    three grid containing the digits 1 through 9. When the user chooses a position by
    typing a number, place an X in the appropriate spot. Generate a random number for
    the position where the computer will place an O. Do not allow the player or the
    computer to place a symbol where one has already been placed. Figure 9-26 shows
    the first four windows in a typical game. When either the player or computer has
    three symbols in a row, declare a winner; if all positions have been exhausted and no
    one has three symbols in a row, declare a tie. Save the game as TicTacToe.java.
    You are required to develop this game using NETBEANS as the interface.

    Due date: 12 September 2013
    That's not how this works. We aren't going to do your homework for you.

    We've asked you to do several things, many of which you seem to be ignoring. How can we help you if you just ignore our advice?

    Please see the link in my signature on asking questions the smart way, then we'll go from there.
    Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  14. #14
    Member
    Join Date
    Sep 2013
    Posts
    70
    Thanks
    1
    Thanked 13 Times in 13 Posts

    Default Re: Tic Tac Toe

    Well your assignment is due in 8 days that is plenty of time to get the program up and running.

    Day | Material to learn
    --------------------------
    Day 1: Data types(Knowing what data type for a variable is important depending on how you will be using it. For example creating a counter (int) or a flag (boolean) that will set off different functions based on them)
    Days 2-3: If Statments & Arrays (You will need a way to determine if there is a winner)
    Days 4-5: Methods & Loops (Reduces rebundancy of having to write the same code over and over and makes everything cleaner)
    Days 6-7: Action Listeners (By the 7th day you should know enough to get the application running. It may not contain all the parts required but enough
    Day 8: Turn in assignment.

    You must understand forums are here to offer help not code. Advice has been offered on what to look at and the code has remained the same. If someone gave you the complete code it would only hurt you as you would not understand the concepts completely.

  15. #15
    Member Hikaros's Avatar
    Join Date
    Sep 2013
    Posts
    42
    My Mood
    Love
    Thanks
    10
    Thanked 2 Times in 2 Posts

    Default Re: Tic Tac Toe

    Why did you even create variable "pawn" if you are directly using input.Equals() ?

    In the count for PC's turn you skipped a number 1,3,7,9,11 when it should be 1,3,5,7,9

    You haven't fixed the pasted text.

    else
             if(input.equals("X"))

    to have a number instead of "X".

    there are also some tests on pc's turn that change the text to X instead of O

  16. #16
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    4,407
    My Mood
    Mellow
    Thanks
    143
    Thanked 603 Times in 590 Posts

    Default Re: Tic Tac Toe

    i appreciate all advices but i feel you guys should look at what the question wants . . . "You are required to develop this game using NETBEANS as the interface."
    Does that mean if no one here uses Netbeans we would be unable to help? Of course not. Java is Java, and that's one of the coolest things about it.

    Stop telling us how to do your job and tell us what help you need to enable you to do your job.

    Good luck!

Similar Threads

  1. Need help with a tic tac toe program
    By RodePope4546 in forum Java Theory & Questions
    Replies: 3
    Last Post: October 22nd, 2012, 05:47 PM
  2. Tic-Tac-Toe Help
    By coke32 in forum Object Oriented Programming
    Replies: 13
    Last Post: March 12th, 2012, 07:59 AM
  3. Tic Tac Toe Program, Can someone help me out????
    By KVM in forum What's Wrong With My Code?
    Replies: 1
    Last Post: February 24th, 2012, 07:11 PM
  4. Tic Tac Toe Program, Can someone help me out????
    By KVM in forum What's Wrong With My Code?
    Replies: 2
    Last Post: February 23rd, 2012, 03:47 PM
  5. [SOLVED] Tic Toe java code exists when we enter 0 row and 0 column
    By big_c in forum File I/O & Other I/O Streams
    Replies: 2
    Last Post: May 13th, 2009, 07:16 AM