public ChoiceWeight(RandomExecutorBase executor, DuelPhase phase, int turn, Dialogs dialogs) { Executor = executor; Phase = phase; Turn = turn; Dialogs = dialogs; }
public Duel() { TurnCount = 0; Phase = DuelPhase.Draw; PlayerTurn = true; CanMove = false; AI = new AI(this); }
public void DrawCard(Player player, List <Card> list) { Card value = null; if (list != null) { int count = 0; int n = list.Count - 1; value = list[n]; if (count < 1) { list.RemoveAt(n); } count++; } if (player.Hand[0] == null) { player.Hand[0] = value; } else if (player.Hand[1] == null) { player.Hand[1] = value; } else if (player.Hand[2] == null) { player.Hand[2] = value; } else if (player.Hand[3] == null) { player.Hand[3] = value; } else if (player.Hand[4] == null) { player.Hand[4] = value; } else if (player.Hand[5] == null) { player.Hand[5] = value; } if (PlayerTurn) { DoDraw(player); } else { Phase = DuelPhase.Draw; DoComputerDraw(player); } }
public void DoDraw(Player player) { if (PlayerTurn) { if (Phase == DuelPhase.Draw) { Phase = DuelPhase.Action; CanMove = true; } } }
public void DoComputerDraw(Player oponent) { if (!PlayerTurn) { if (Phase == DuelPhase.Draw) { Phase = DuelPhase.Action; DoComputerAction(oponent); } } }
public void DoComputerEnd(Player player) { if (!PlayerTurn) { if (Phase == DuelPhase.End) { PlayerTurn = true; TurnCount += 1; Phase = DuelPhase.Start; } } }
public void DoEndTurn(Player player) { if (PlayerTurn) { if (Phase == DuelPhase.End) { CanMove = false; PlayerTurn = false; TurnCount += 1; Phase = DuelPhase.Start; } } }
public void EndTurn(Player player) { Phase = DuelPhase.End; DoEndTurn(player); }