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

import resources.Algo;

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

    @Override
    public void attack(int guess, int attacker, int target) {
        if (isDeckLess()) {
            algo.inputSelectB(guess, attacker, target);
            isSucceedLatestAttack = algo.getSucceedSelectB().getKey();
        } else {
            algo.inputDrawB(guess, target);
            isSucceedLatestAttack = algo.getSucceedDrawB().getKey();
        }
    }
}