Created
March 24, 2011 12:20
-
-
Save neilmanuell/884959 to your computer and use it in GitHub Desktop.
example of enumberation type
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
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