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"); ...
User Profile
Collapse
-
keeping track of an array
-
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... -
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...
No activity results to display
Show More
Leave a comment: