Skip to content

Instantly share code, notes, and snippets.

@neilmanuell
Created March 24, 2011 12:20
Show Gist options
  • Save neilmanuell/884959 to your computer and use it in GitHub Desktop.
Save neilmanuell/884959 to your computer and use it in GitHub Desktop.
example of enumberation type
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;
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;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment