User Profile

Collapse

Profile Sidebar

Collapse
yuki
yuki
Last Activity: Dec 13 '07, 11:48 AM
Joined: Nov 28 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • yuki
    started a topic keeping track of an array
    in Java

    keeping track of an array

    the problem i have with this program is that i don't know how to check if the shot direction is where the wumpus will be or not.


    this is the part of the program i am having trouble with which is located towards the end of the main method.

    if (move == 5) // shoot the wumpus in the world
    {
    System.out.prin tln("Which direction would you like to shoot? 1=up, 2=down, 3=right, 4=left"); ...
    See more | Go to post

  • yuki
    replied to Hunt the Wumpus
    in Java
    some problems i fixed

    i already fixed this part:

    for (int row = 0; row <4; row ++)
    {
    for (int col = 0; col <6; col ++)
    {
    maze[row][col] = '0';
    }
    }



    and this part:

    move = in.nextInt(Syst em.in);

    to this:

    move = in.nextInt();


    i just need to find out how to check where...
    See more | Go to post
    Last edited by yuki; Nov 29 '07, 06:59 PM. Reason: it didnt work the first time

    Leave a comment:


  • yuki
    started a topic Hunt the Wumpus
    in Java

    Hunt the Wumpus

    i'm trying to write the hunt the wumpus game with simple conditions: (check-marked the ones i already accomplished)
    [x]the pits will be placed randomly
    [x] the wumpus is placed in the maze randomly (not sure if i did that one correctly)
    [x] the player starts on the lower left of the maze row 3 col 0
    -the player will only have 1 chance to shoot the Wumpus
    [x]if the player is close to the Wumpus then there would...
    See more | Go to post
    Last edited by yuki; Nov 28 '07, 05:58 PM. Reason: pointed out the problems in the program
No activity results to display
Show More
Working...