public void setPlayer(int x, int y) {
        if (x < 0 || y < 0 || x >= getWidth() || y >= getHeight())
            return;

        // Free old position
        if (this.playerPos != null) {
            this.field[playerPos.y][playerPos.x] = FieldType.FREE.ordinal();
        }

        this.playerPos = new Point(x, y);

        this.field[y][x] = FieldType.PLAYER.ordinal();
    }