Skip to content

Instantly share code, notes, and snippets.

@mauricio
Created July 4, 2012 16:24
Show Gist options
  • Select an option

  • Save mauricio/3048142 to your computer and use it in GitHub Desktop.

Select an option

Save mauricio/3048142 to your computer and use it in GitHub Desktop.
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