Ahmed Adamjee
/
SnakeVSBlock
Snake vs Block Game to be run upon K64F.
Diff: GameEngine/LengthManager/LengthManager.cpp
- Revision:
- 79:35cb65c52d25
- Child:
- 83:329da564799a
diff -r 10e5cc013806 -r 35cb65c52d25 GameEngine/LengthManager/LengthManager.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/GameEngine/LengthManager/LengthManager.cpp Sun May 05 23:48:57 2019 +0000 @@ -0,0 +1,45 @@ +#include "LengthManager.h" + +LengthManager::LengthManager() +{ + +} + +LengthManager::~LengthManager() +{ + +} + + + +void LengthManager::init() +{ + _length = 4; +} + +void LengthManager::MinusLength() +{ + _length -= 1; +} + +void LengthManager::PlusLength() +{ + _length += 1; +} + +void LengthManager::print_length_on_screen(N5110 &lcd) +{ + char bufferscore[14]; + sprintf(bufferscore,"%d",_length); + lcd.printString(bufferscore,1,0); +} + +int LengthManager::_getLength() +{ + return _length; +} + +void LengthManager::_setLength(int length) +{ + _length = length; +}