CruceGameDevel / CruceGame

Open source card game
GNU General Public License v2.0
19 stars 19 forks source link

Score limit #200

Closed aenachescu closed 10 years ago

aenachescu commented 10 years ago

Added getLimitScore() which get the limit score. #186

Paul92 commented 10 years ago

As we do not accept any value, it is pretty hard to debug (too many rounds to play), if that's needed. So, use the C preprocessor to implement 2 compile-modes: debug and release. In debug mode you should be able to insert any score limit you wish, while in release mode you can insert just the accepted limits. In order to implement this, you need to use preprocessor directives #ifdef, #else and #endif. You will find more information about them here: http://www.cplusplus.com/doc/tutorial/preprocessor/. Basically, you should check if a constant called DEBUG is defined. If that's the case, do not check for score limit. Otherwise check it. You will also need to add -DDEBUG flag to CFLAGS variable in Makefile.am, as we want to use the debug mode in development.