public void update() {
        Player player = Map.getPlayer();
        keyboard.update();
        if (keyboard.up) {
            player.move(0, -1);
        } else if (keyboard.down) {
            player.move(0, 1);
        }
        if (keyboard.left) {
            player.move(-1, 0);
        } else if (keyboard.right) {
            player.move(1, 0);
        }
        screen.setOffset(player.getX() - width / 2 + Character.SIZE / 2,
                player.getY() - height / 2 + Character.SIZE / 2);

        if (keyboard.space) {
            player.attack();
        }

        Map.update();
    }