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.
Dependencies: mbed
Treasure.cpp
- Committer:
- weixitao
- Date:
- 2017-05-01
- Revision:
- 1:83459533ff72
- Parent:
- 0:1465fd20e75b
File content as of revision 1:83459533ff72:
#include "Treasure.h"
#include "N5110.h"
extern N5110 lcd;
void Treasure::treasure_place()
{
TreasureX = rand()%70+5;
TreasureY = rand()%30+5;
}
void Treasure::treasure_show()
{
lcd.drawRect(TreasureX,TreasureY,10,8,FILL_BLACK);
lcd.drawRect(TreasureX+2,TreasureY+1,6,4,FILL_WHITE);
lcd.drawRect(TreasureX+4,TreasureY+2,2,2,FILL_BLACK);
//printf("The treasure is displayed");
}