package agents;

import java.util.Random;

import wumpus.Agent;
import wumpus.Environment;
import wumpus.Environment.Action;
import wumpus.Player;

/**
 * The fake agent tha implements random actions strategy.
 */
public class RandomAgent implements Agent {
    public Random random = new Random();
    public Action[] actions = {
            Action.GO_FORWARD,
            Action.GO_FORWARD,
            Action.GO_FORWARD,
            Action.GO_FORWARD,
            Action.TURN_LEFT,
            Action.TURN_RIGHT,
            Action.GRAB,
            Action.SHOOT
    };

    public void beforeAction(Player player) {
        System.out.println(player.render());
        System.out.println(player.debug());
    }

    public void afterAction(Player player) {
        // Players Last action
        System.out.println(player.getLastAction());
        // Show a very happy message
        if (player.isDead()) {
            System.out.println("GAME OVER!");
        }
    }

    public Action getAction(Player player) {
        int x = player.getX();
        int y = player.getY();
        // Feel the perceptions
        boolean bump = player.hasBump();
        boolean breeze = player.hasBreeze();
        boolean stench = player.hasStench();
        boolean scream = player.hasScream();
        boolean glitter = player.hasGlitter();

        if (bump || breeze || stench || scream || glitter) {
            // TODO: Do some action based on the players perception...
        }

        return actions[random.nextInt(actions.length - 1)];
    }
}

@@ -262,16 +262,22 @@
  public 
+final 
 Random r
@@ -305,24 +305,30 @@
 %0A    public 
+final 
 Action%5B%5D act
@@ -579,16 +579,123 @@
     %7D;%0A%0A
+    /**%0A     * Prints the player board and debug message.%0A     * @param player The player instance%0A     */%0A
     publ
@@ -820,32 +820,126 @@
 ebug());%0A    %7D%0A%0A
+    /**%0A     * Prints the last action taken.%0A     * @param player The player instance%0A     */%0A
     public void 
@@ -1177,24 +1177,171 @@
    %7D%0A    %7D%0A%0A
+    /**%0A     * Implements a strategy that takes any random action.%0A     * @param player The player instance%0A     * @return The next action%0A     */%0A
     public A

Add docstrings to the agent