Newer
Older
Algolike / src / main / java / controls / TurnPlayer.java
Shinji on 9 Aug 2022 553 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.selectAndAttackA(attacker, target, guess);
            isSucceedLatestAttack = algo.getResultBySelectingA().getKey();
        } else {
            algo.drawAndAttackA(target, guess);
            isSucceedLatestAttack = algo.getResultByDrawingA().getKey();
        }
    }
}