robfitz / diamondrun

diamondrun
0 stars 0 forks source link

Switch type strings into an enum #13

Closed robfitz closed 10 years ago

robfitz commented 10 years ago

Now that we've got a bunch of types being represented as strings (unit, shooter, jumper, unitCard, burnCard, etc), it will probably save us some pain to put those into enums.

There's not really a standard syntax, but one possibility is:

var ColorEnum = Object.freeze({RED: 'red', GREEN: 'green', BLUE: 'blue'});