Yuheng Huo
/
hyh_copy
test
life/life.cpp
- Committer:
- Neowless
- Date:
- 2020-05-15
- Revision:
- 3:31ff7b3e2005
File content as of revision 3:31ff7b3e2005:
#include "life.h" void life::init(){ lives = 3; int d[56] = { 0,1,1,0,0,1,1,0, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1, 0,1,1,1,1,1,1,0, 0,0,1,1,1,1,0,0, 0,0,0,1,1,0,0,0}; } } void life::update(){ lives=lives-1; } void life::display(N5110 &lcd){ for(int i = 0; i < _num; i++){ int x = 0 + 8*i; Bitmap p(icon, 7, 8); p.render(lcd, x, 0); } } int life::liferest(){return _num;}