Newer
Older
Algolike / src / main / java / controls / TurnPlayer.java
Shinji on 9 Aug 2022 537 bytes コードの整形
package controls;

import resources.Algo;

public class TurnPlayer extends AbstractGameState {
    public TurnPlayer(Algo algo) {
        super(algo);
    }

    @Override
    public void attack(int guess, int attacker, int target) {
        if (isDeckLess()) {
            algo.inputSelectA(guess, attacker, target);
            isSucceedLatestAttack = algo.getSucceedSelectA().getKey();
        } else {
            algo.inputDrawA(guess, target);
            isSucceedLatestAttack = algo.getSucceedDrawA().getKey();
        }
    }
}