| Package | com.whirled.contrib.card |
| Class | public class HandEvent |
| Inheritance | HandEvent flash.events.Event |
| Property | Defined by | ||
|---|---|---|---|
| cards : CardArray
[read-only] The cards that have been dealt or passed.
| HandEvent | ||
| count : int [read-only] The number of cards requested to be passed.
| HandEvent | ||
| player : int [read-only] The player that passed or requested to pass the cards.
| HandEvent | ||
| targetPlayer : int [read-only] The player that is being passed to.
| HandEvent | ||
| Property | Defined by | ||
|---|---|---|---|
| _cards : CardArray | HandEvent | ||
| _count : int | HandEvent | ||
| _player : int | HandEvent | ||
| _targetPlayer : int | HandEvent | ||
| Method | Defined by | ||
|---|---|---|---|
|
Create a new HandEvent.
| HandEvent | ||
|
clone():Event
| HandEvent | ||
|
toString():String
| HandEvent | ||
| Constant | Defined by | ||
|---|---|---|---|
| ALLOWED_PLAY : String = "hand.allowedPlay" [static] The type of event when it is the player's turn.
| HandEvent | ||
| ALLOWED_SELECTION : String = "hand.allowedSelection" [static] The type of event when the local player may choose some cards, but not yet play them's turn.
| HandEvent | ||
| CARDS_PLAYED : String = "hand.played" [static] The type of event sent when cards have been selected for play.
| HandEvent | ||
| DEALT : String = "hand.dealt" [static] The type of event when the hand is dealt.
| HandEvent | ||
| DISALLOWED_SELECTION : String = "hand.disallowedSelection" [static] The type of event sent when the local player can no longer select or play any cards.
| HandEvent | ||
| PASSED : String = "hand.passed" [static] The type of event when cards are passed to the hand from another player.
| HandEvent | ||
| PASS_REQUESTED : String = "hand.requested" [static] The type of event when the rules of the game require the local player to pass cards.
| HandEvent | ||
| _cards | property |
protected var _cards:CardArray
| cards | property |
cards:CardArray [read-only]The cards that have been dealt or passed.
Implementation public function get cards():CardArray
| _count | property |
protected var _count:int
| count | property |
count:int [read-only]The number of cards requested to be passed.
Implementation public function get count():int
| _player | property |
protected var _player:int
| player | property |
player:int [read-only]The player that passed or requested to pass the cards.
Implementation public function get player():int
| _targetPlayer | property |
protected var _targetPlayer:int
| targetPlayer | property |
targetPlayer:int [read-only]The player that is being passed to.
Implementation public function get targetPlayer():int
| HandEvent | () | constructor |
public function HandEvent(type:String, cards:CardArray = null, player:int = 0, count:int = 0, targetPlayer:int = 0)Create a new HandEvent.
Parameterstype:String |
|
cards:CardArray (default = null) |
|
player:int (default = 0) |
|
count:int (default = 0) |
|
targetPlayer:int (default = 0) |
| clone | () | method |
public override function clone():EventReturns
Event |
| toString | () | method |
public override function toString():StringReturns
String |
| ALLOWED_PLAY | constant |
public static const ALLOWED_PLAY:String = "hand.allowedPlay"The type of event when it is the player's turn. For this event, the cards property is set to the set of cards that are allowed according to the game rules and the count property is set to the number of cards that should be played. The player and targetPlayer properties are not used.
| ALLOWED_SELECTION | constant |
public static const ALLOWED_SELECTION:String = "hand.allowedSelection"The type of event when the local player may choose some cards, but not yet play them's turn. For this event, the cards property is set to the set of cards that are allowed to be selected (according to the game rules or game presentation) and the count property is set to the number of cards that may be selected. The player and targetPlayer properties are not used.
| CARDS_PLAYED | constant |
public static const CARDS_PLAYED:String = "hand.played"The type of event sent when cards have been selected for play. For this event, the cards property indicates the selected ones and the other properties are not used.
| DEALT | constant |
public static const DEALT:String = "hand.dealt"The type of event when the hand is dealt. For this event, the cards property is the new contents of the hand and the player, count and targetPlayer properties are not used.
| DISALLOWED_SELECTION | constant |
public static const DISALLOWED_SELECTION:String = "hand.disallowedSelection"The type of event sent when the local player can no longer select or play any cards. For this event, no properties are used.
| PASSED | constant |
public static const PASSED:String = "hand.passed"The type of event when cards are passed to the hand from another player. For this event, the cards property is the passed cards (if available), the player is the id of the player who has passed them, the count property is the number of cards passed and the targetPlayer is the id of the player receiving the passed cards.
| PASS_REQUESTED | constant |
public static const PASS_REQUESTED:String = "hand.requested"The type of event when the rules of the game require the local player to pass cards. For this event type, the cards property is not used, the player property is the id of the player who is required to pass, the count property is the number of cards that should be passed and the targetPlayer is the player who will receive the passed cards.