diff --git a/src/main/java/models/Algo.java b/src/main/java/models/Algo.java index 996140c..391cb4b 100644 --- a/src/main/java/models/Algo.java +++ b/src/main/java/models/Algo.java @@ -10,13 +10,23 @@ private LoseA loseA; private HandsA handsA; private Deck deck; + private SucceedDrawA succeedDrawA; + private SucceedDrawB succeedDrawB; + private SucceedSelectA succeedSelectA; + private SucceedSelectB succeedSelectB; int turnCount=0; public Algo() { + ///モデル生成分 loseB = new LoseB(); handsB = new HandsB(loseB); loseA = new LoseA(); handsA = new HandsA(loseA); deck = new Deck(); + succeedDrawA = new SucceedDrawA(handsB,deck,handsA); + succeedDrawB = new SucceedDrawB(deck,handsB,handsA); + succeedSelectA = new SucceedSelectA(handsB,handsA); + succeedSelectB = new SucceedSelectB(handsA,handsB); + //追加分 deck.reset(DECK_COUNT); for(int i=0;i<2;i++){ handsA.getValue().add(deck.head()); @@ -50,12 +60,33 @@ this.handsB.selectB(guess, attacker, a, target); this.handsA.selectB(guess, attacker, a, target); } + public void inputSelectA(int guess, int attacker, int target) { + this.succeedSelectA.inputSelectA(guess, attacker, target); + } + public void inputDrawA(int guess, List> b, int target) { + this.succeedDrawA.inputDrawA(guess, b, target); + } + public void inputDrawB(int guess, List> a, int target) { + this.succeedDrawB.inputDrawB(guess, a, target); + } + public void inputSelectB(int guess, int attacker, int target) { + this.succeedSelectB.inputSelectB(guess, attacker, target); + } private void countUpTurn(){ turnCount++; } - public List> getDeck() { + public Map.Entry> getSucceedSelectB() { + return succeedSelectB.getValue(); + } + public Map.Entry> getSucceedSelectA() { + return succeedSelectA.getValue(); + } + public List getDeck() { return deck.getValue(); } + public Map.Entry getSucceedDrawB() { + return succeedDrawB.getValue(); + } public boolean getLoseA() { return loseA.getValue(); } @@ -68,4 +99,7 @@ public List> getHandsA() { return handsA.getValue(); } + public Map.Entry getSucceedDrawA() { + return succeedDrawA.getValue(); + } } \ No newline at end of file