package controls;
import org.junit.jupiter.api.Test;
import resources.Algo;
import static controls.ConstantMethods.printAlgoState;
import static org.junit.jupiter.api.Assertions.assertEquals;
class BotIntelligenceTest {
/**
* 正しく未確定数字を計算ができる
*/
@Test
void testCalc() {
var algo = new Algo();
algo.distributeHands();
BotIntelligence botIntelligence=new BotIntelligence(new TurnBot(algo));
var candidate=botIntelligence.calculateCandidate();
printAlgoState(algo);
var s= "[";
for (var i : candidate)s+=i+" ";
s+="]";
System.out.println(s);
}
/**
* 各手札のカードに対して候補を算出できる
*/
@Test
void calc(){
var algo = new Algo();
BotIntelligence botIntelligence=new BotIntelligence(new TurnBot(algo));
var iniHandsANum = algo.getHandsA().size();
var initDeckNum=algo.getDeck().size();
//正解のカードを選択させるための変数
var guess = algo.getHandsB().get(0).getNumber();
var target = 1;
//テスト対象メソッド
algo.setTargetA(target);
algo.setGuessA(guess);
algo.drawAndAttackA();
printAlgoState(algo);
botIntelligence.assignCandidateNumberEachHand();
}
}