Tic Tac Toe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • giorgos113
    New Member
    • Oct 2006
    • 2

    Tic Tac Toe

    Can i have a tic tac toe java code pls..

    thnx!
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by giorgos113
    Can i have a tic tac toe java code pls..

    thnx!
    You want to do this on your own first and ask for help when and where you need it.

    Comment

    • snehalsnehal
      New Member
      • Dec 2006
      • 1

      #3
      can i have a tic tac toe java code (NOT USING APPLETS) please send to my mail addrs: gujjarlapudis@h otmail.com

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by snehalsnehal
        can i have a tic tac toe java code (NOT USING APPLETS) please send to my mail addrs: gujjarlapudis@h otmail.com
        Perhaps you should read the posting guidelines first.

        Comment

        • DeMan
          Top Contributor
          • Nov 2006
          • 1799

          #5
          here is a Tic Tac Toe code I made especially:

          Code:
          class TicTacToe{
            int main(String argv[])
            {
              System.out.println("Tic Tact Toe");
            }
          }

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by DeMan
            here is a Tic Tac Toe code I made especially:

            Code:
            class TicTacToe{
            int main(String argv[])
            {
            System.out.println("Tic Tact Toe");
            }
            }
            you should have it as

            Code:
             class TicTacToe { 
            	  public static void main(String[] args) {
            			 System.out.println("Tic Tac Toe");
            	  }
            }

            Comment

            • DeMan
              Top Contributor
              • Nov 2006
              • 1799

              #7
              Sorry, my mistake....I'll make sure I run my program first in future...
              for clarity though, you should comments might make it more obvious to see what you are trying to do.....
              Code:
              class TicTacToe { 
              
                                /*drivier class, taking array of arguments as input*/
              	  public static void main(String[] args) {
              
                                                               /* Display TicTacToe to the screen */
              			 System.out.println("Tic Tac Toe");
              	  }
              }

              Comment

              • r035198x
                MVP
                • Sep 2006
                • 13225

                #8
                Originally posted by DeMan
                Sorry, my mistake....I'll make sure I run my program first in future...
                for clarity though, you should comments might make it more obvious to see what you are trying to do.....
                Code:
                 
                class TicTacToe { 
                 
                /*drivier class, taking array of arguments as input*/
                	 public static void main(String[] args) {
                 
                /* Display TicTacToe to the screen */
                			 System.out.println("Tic Tac Toe");
                	 }
                }
                Yes much better now.

                Comment

                • DeMan
                  Top Contributor
                  • Nov 2006
                  • 1799

                  #9
                  and I'm not sure why my spaces occasionally get ignored.....

                  Comment

                  • r035198x
                    MVP
                    • Sep 2006
                    • 13225

                    #10
                    Originally posted by DeMan
                    and I'm not sure why my spaces occasionally get ignored.....
                    Spaces in code tags or in other text?

                    Comment

                    • DeMan
                      Top Contributor
                      • Nov 2006
                      • 1799

                      #11
                      In code taghs as per the examples above (in my first reply and then in the comments I added most recently). I have only used space-bar spaces (and lots of them), so I kinda assume people are using some sort of tab space that I haven't cottoned on to

                      Comment

                      • DeMan
                        Top Contributor
                        • Nov 2006
                        • 1799

                        #12
                        scrub that... i just noticed that they DID work (kinda)....my mistake......

                        Comment

                        • r035198x
                          MVP
                          • Sep 2006
                          • 13225

                          #13
                          Originally posted by DeMan
                          scrub that... i just noticed that they DID work (kinda)....my mistake......
                          I used to have problems with my code format. Every time I posted it seemed to add an extra level of indentation in my code. The problem only stopped when I changed to Enhanced Interface in the options

                          Comment

                          • DeMan
                            Top Contributor
                            • Nov 2006
                            • 1799

                            #14
                            I had wondered what the enhanced mode was and kept forgetting to try it. Thanx I'll give it a whirl!!

                            Comment

                            Working...