import java.util.Random; public class RandomBot extends Bot{ public RandomBot(){ this.name="RandomBot"; } @Override public Action action(int[][] map) { return new Action[]{Action.UP,Action.DOWN,Action.LEFT,Action.RIGHT,Action.PASS}[(new Random()).nextInt(5)]; } }