Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
life.cpp
00001 #include "life.h" 00002 00003 void life::init(){ 00004 lives = 3; 00005 int d[56] = { 00006 0,1,1,0,0,1,1,0, 00007 1,1,1,1,1,1,1,1, 00008 1,1,1,1,1,1,1,1, 00009 1,1,1,1,1,1,1,1, 00010 0,1,1,1,1,1,1,0, 00011 0,0,1,1,1,1,0,0, 00012 0,0,0,1,1,0,0,0}; 00013 } 00014 } 00015 void life::update(){ 00016 lives=lives-1; 00017 00018 } 00019 void life::display(N5110 &lcd){ 00020 for(int i = 0; i < _num; i++){ 00021 int x = 0 + 8*i; 00022 Bitmap p(icon, 7, 8); 00023 p.render(lcd, x, 0); 00024 } 00025 } 00026 00027 int life::liferest(){return _num;} 00028
Generated on Mon Jul 18 2022 01:51:48 by
1.7.2