breber / cardgames

Repository for continuation of CS309 Project
https://play.google.com/store/apps/details?id=com.worthwhilegames.cardgames
3 stars 1 forks source link

Refactor constants usage/naming #28

Closed breber closed 11 years ago

breber commented 11 years ago

The naming of constants was not very uniform, making it difficult to figure out what a specific constant is used for (as a key to a JSON object, as a message type for game, etc). Also, the numbering scheme used for constants was set up in a way that made extensibility rather difficult. There wasn't any rhyme or reason to the numbering system.

The code has been updated with a consistent naming scheme for constants. Also, all generic constants (contants independent of game type) shall be below 1000. All constants for Crazy Eights shall be between 1000 and 1999 inclusive. All constants for Euchre shall be between 2000 and 2999 inclusive. And when adding new game types, they shall follow the same convention.

breber commented 11 years ago

Needs testing.

breber commented 11 years ago

When you get a chance, please review to make sure nothing obvious is broken.

Thanks.

cc @anelson6, @jgkujawa, @j7peters