Skip to content

Instantly share code, notes, and snippets.

@neilmanuell
Created March 24, 2011 12:22
Show Gist options
  • Save neilmanuell/884961 to your computer and use it in GitHub Desktop.
Save neilmanuell/884961 to your computer and use it in GitHub Desktop.
example of enumber but with muatable data property
package {
public class PlayingCard {
public static const SIX_OF_CLUBS:PlayingCard = new PlayingCard( "clubs", 6);
public static const JACK_OF_HEARTS:PlayingCard = new PlayingCard( "hearts", 11);
private var _index:int;
private var _suit:String;
private var _data:Object;
public function PlayingCard(suit:String, index:int) {
_suit = suit;
_index = index;
}
public function get suit():String {
return _suit;
}
public function get index():int {
return _index;
}
public function get data():Object{
return _data;
}
public function set data( value:Object):void{
_data = value;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment