Results 1 to 5 of 5

Thread: Using ASCII...

  1. #1
    putrify is offline Member
    Join Date
    Sep 2011
    Posts
    10
    Rep Power
    0

    Default Using ASCII...

    I'm making a tictactoe program, but the board has to be printed out using ASCII...but well it needs to be a 3x3 array so the player can choose the row and column to place their marker...I had already printed out a board but then I thought, how am I gonna access it? And now I'm stumped..

    Java Code:
        |  |
      --|--|--
        |  |
      --|--|--
        |  |
    Should look something like this
    Last edited by putrify; 09-10-2011 at 01:24 AM.

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Using ASCII...

    how am I gonna access it?
    Can you explain what your problem is?

  3. #3
    putrify is offline Member
    Join Date
    Sep 2011
    Posts
    10
    Rep Power
    0

    Default Re: Using ASCII...

    Well first I have to print out the game board, as shown above, and then prompt the player to choose row and column of where they want to place their marker. I know I need to make a new array, but how is the marker gonna show up on the board if I made it using ascii?....if that makes sense :S

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,587
    Rep Power
    25

    Default Re: Using ASCII...

    how is the marker gonna show up on the board if I made it using ascii
    What do you mean by "using ascii"? Do you have other character choices for the output?

    I assume you are printing on the console using System.out.print or println().
    The 3x3 board is made up of many prints line by line. To show an X or O on the board, you will need to print the X or O instead of the space you are currently printing.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,423
    Rep Power
    20

    Default Re: Using ASCII...

    You will need to print the entire board after each move.

    db

Similar Threads

  1. help - Ascii to hex and hex to ascii conversion
    By rjagan in forum New To Java
    Replies: 8
    Last Post: 06-14-2011, 01:53 PM
  2. Non-ASCII Characters
    By AJArmstron@aol.com in forum New To Java
    Replies: 6
    Last Post: 05-06-2010, 11:16 PM
  3. add ascii values together
    By greg677 in forum New To Java
    Replies: 4
    Last Post: 05-03-2010, 02:09 AM
  4. Another ascii question....
    By akira220984 in forum New To Java
    Replies: 5
    Last Post: 02-20-2009, 02:38 AM
  5. I need help with ascii characters
    By Grandon in forum Eclipse
    Replies: 17
    Last Post: 11-08-2008, 03:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •