Created
July 4, 2012 16:24
-
-
Save mauricio/3048142 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| object ShowTopDeck | |
| case class ShowTopDeckResponse( card : Card ) | |
| case class ExchangeCard( originalCard : Card, replacementCard : Card ) | |
| class Swindler extends Card { | |
| override def cost = 3 | |
| override def action( player : Player ) { | |
| val players = List[Player]() // listar os atores jogadores ativos que não o atual | |
| players.foreach { | |
| otherPlayer => | |
| (otherPlayer ? ShowTopDeck).onComplete { | |
| case ShowTopDeckResponse( card ) => { | |
| val replacementCard : Card = null // pick card here | |
| otherPlayer ! ExchangeCard( card, replacementCard ) | |
| } | |
| } | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment