Skip to content

Instantly share code, notes, and snippets.

@timrisi
Created August 27, 2011 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save timrisi/1175039 to your computer and use it in GitHub Desktop.
Save timrisi/1175039 to your computer and use it in GitHub Desktop.
cardRoot.Add (new Section
{
new StringElement ("Play Card", delegate
{
if (game.cardPlaysRemaining > 0)
{
game.currentCard = cardPlayed;
if (cardPlayed.title.Equals("Peace Talks"))
{
NavigationController.PushViewController(new ContinuingEffects(parent), true);
return;
}
if (cardPlayed.execute(game))
{
parent.cardComplete();
NavigationController.PopToViewController(NavigationController.ViewControllers[1], true);
return;
}
List<Position> positions = cardPlayed.startPositions(game);
parent.clearHighlights();
parent.showPossibleMovesForCard(positions);
NavigationController.PopToViewController(NavigationController.ViewControllers[1], true);
}
})
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment