Created
August 27, 2011 05:43
-
-
Save timrisi/1175039 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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