private void doWalk(GameMap retMap) {
        int x;
        int y;
        do {
            x = rand.nextInt(retMap.getX() - 2) + 1;
            y = rand.nextInt(retMap.getY() - 2) + 1;
        } while (retMap.getCell(x, y).isPassable());
        while (!retMap.nextToCell(x, y, MapCellFloor.getInstance())) {
            switch (getDirection()) {
                case UP:
                    y--;
                    break;
                case DOWN:
                    y++;
                    break;
                case LEFT:
                    x--;
                    break;
                case RIGHT:
                    x++;
                    break;
            }
            x = Math.max(1, Math.min(x, retMap.getX() - 2));
            y = Math.max(1, Math.min(y, retMap.getY() - 2));
            if (false) {
                retMap.setCell(x, y, MapCellFloorColor.getInstance(Color.BLUE));
                Visualizer.displayMap(retMap);
                retMap.setCell(x, y, MapCellWall.getInstance());
            }
        }
        retMap.setCell(x, y, MapCellFloor.getInstance());
        if (visual) {
            Visualizer.displayMap(retMap);
        }
    }