public void EndPhase(PlayerState playerState)
{
if (playerState.PlayPhase == PlayPhase.PlayTreasure)
{
this.textWriter.Write("Played ");
WriteAllCards(this.playedTreasures);
this.playedTreasures.Clear();
this.PushScope();
this.textWriter.WriteLine(" ... and has {0} coins and {1} buys available.", playerState.AvailableCoins, playerState.AvailableBuys);
this.PopScope();
}
else if (playerState.PlayPhase == PlayPhase.Buy)
{
this.textWriter.Write("Bought ");
WriteAllCards(this.boughtCards);
this.boughtCards.Clear();
}
else if (playerState.PlayPhase == PlayPhase.Cleanup)
{
this.textWriter.Write("Discarded ");
WriteAllCards(this.discardedCards);
this.discardedCards.Clear();
}
else if (playerState.PlayPhase == PlayPhase.DrawCards)
{
WriteOutDrawnCardsIfNecessary();
}
}