i'm almost done with this program but i can't figure out how to shoo the wumpus. i'm stuck as to how the shot direction has the wumpus in there.

it's the last part of the main method is where i put it..please help thanks

import java.util.*;
public class playWumpus
{
//initMaze METHOD
//put the pits and wumpus into the world
public static void initMaze(char [][] maze)
{
Random r = new Random();

for (int row = 0; row <4; row ++)
{
for (int col = 0; col<6; col ++)
{
maze[row][col] = '0';
}
}
int pitRow, pitCol;
for (int pitNum = 0; pitNum <4; pitNum++)
{
pitRow = r.nextInt(4); //randomly choose row
pitCol = r.nextInt(6); //randomly choose column
if (pitRow == 3 && pitCol == 0)//start location
{
pitCol=5;
}
maze [pitRow][pitCol] = 'p'; //places the pits in the maze randomly
}
maze [r.nextInt(4)][r.nextInt(6)] = 'w'; //places the wumpus randomly in the maze
}// end of Maze method


//CHECKMOVE method
//possible outcomes: run into the wall , fall into the pit, eaten by wumpus,
//feel breeze, smell stench, nothing.
public static int checkMove(char [] [] maze, int newRow, int newCol)
{
//checks if they run into a wall
if (newRow<0 || newRow>3 || newCol<0 || newCol>5)
{
System.out.println("You hit a wall");
return 0;
// it will return to the main method and places 0 in the state variable
}
else if (maze[newRow][newCol] == 'p')
//this checks the maze if there is a P in that location
{
System.out.println("You fall into a pit");
return 2;
}
else if (maze[newRow][newCol] == 'w')//checks for the wumstem.out.println("You've eaten by the Wumpus!!");
return 2;
}
//checks for the breeze (right,left,down,up)
if (
(newCol>0 && maze[newRow][newCol-1] == 'p') ||
(newCol<5 && maze[newRow][newCol+1] =='p') ||
(newRow>0 && maze[newCol][newRow-1] == 'p') ||
(newRow<3 && maze[newCol][newRow+1] =='p')
)
{
System.out.println("You feel a breeze");
}

return 1;

}//end of the maze method

public static void main(String [ ] args)
{
char [ ] [ ] maze = new char [4][6]; //the actual map of the game
int playerRow=3, playerCol=0; // player location aka lat/long
Scanner in= new Scanner(System.in);
int move, state;

// state of the game
// state 0= illegal move, 1= legal move, 3= end game
initMaze (maze); // calling the initMaze method
do
{
System.out.println("What would you like to do? 1=up, 2=down, 3=right 4=left, 5=shoot");
move = in.nextInt();
if (move ==1) // move up in the world
{
state = checkMove(maze, playerRow-1,playerCol); //these are coordinates
if ( state >0 ) // legal move
{
playerRow = playerRow-1;
}
}
if (move ==2) // move down in the world
{
state = checkMove(maze, playerRow+1,playerCol);
if ( state >0 ) // legal move
{
playerRow = playerRow+1;
}
}
if (move ==3) // move right in the world
{
state = checkMove(maze, playerRow,playerCol+1);
if ( state > 0 ) // legal move
{
playerCol = playerCol+1;
}
}
if (move ==4) // move left in the world
{
state = checkMove(maze, playerRow,playerCol-1);
if ( state >0 ) // legal move
{
playerCol = playerCol-1;
}

}
if (move == 5) // shoot the wumpus in the world
{
System.out.println("Which direction would you like to shoot? 1=up, 2=down, 3=right, 4=left");
int shootDir = in.nextInt();



// check if the wumpus gets killed
if ( shootDir == 1 )
{

}

}

}while (state!=2);

}//end of main

}//end of class

what in the world is a wumpus?

Hunt the Wumpus is an early computer game, based on a simple hide-and-seek format featuring a mysterious monster (the Wumpus) that lurks deep inside a network of rooms.

originally written by gregory yob

To "shoo" the Wumpus, you need to modify the code inside the if statement `if (move == 5) // shoot the wumpus in the world`.

Here are the steps to shoot the Wumpus:

1. Add a nested if statement inside the `if (move == 5)` block to handle the shoot direction.
2. Inside the nested if statement, check if the shoot direction matches the Wumpus's location.
3. If the shoot direction matches the Wumpus's location, print a message saying that the Wumpus has been killed.
4. If the shoot direction does not match the Wumpus's location, print a message saying that the shot missed.
5. Update the `state` variable in the if statements to reflect the result of the shot.

Here's an example of how you could implement this:

```java
if (move == 5) // shoot the wumpus in the world
{
System.out.println("Which direction would you like to shoot? 1=up, 2=down, 3=right, 4=left");
int shootDir = in.nextInt();

// check if the Wumpus gets killed
if (shootDir == 1 && playerRow > 0 && maze[playerRow - 1][playerCol] == 'w') {
System.out.println("You killed the Wumpus!");
state = 3;
} else if (shootDir == 2 && playerRow < 3 && maze[playerRow + 1][playerCol] == 'w') {
System.out.println("You killed the Wumpus!");
state = 3;
} else if (shootDir == 3 && playerCol < 5 && maze[playerRow][playerCol + 1] == 'w') {
System.out.println("You killed the Wumpus!");
state = 3;
} else if (shootDir == 4 && playerCol > 0 && maze[playerRow][playerCol - 1] == 'w') {
System.out.println("You killed the Wumpus!");
state = 3;
} else {
System.out.println("You missed the shot!");
state = 1;
}
}
```

Make sure to update the `state` variable depending on whether the shot hits or misses the Wumpus. In this example, the `state` is set to 3 if the Wumpus is killed, and 1 if the shot misses. Finally, remember to update the `state` variable after the `state = checkMove(...)` lines in the movement if statements to handle the cases where the player moves and does not shoot.

Once you have made these modifications, the program should be able to handle shooting the Wumpus.