ELEC2645 (2016/17) / Mbed 2 deprecated Bomb_WeixiTao_el16wt

Dependencies:   mbed

Committer:
weixitao
Date:
Wed Apr 26 16:38:33 2017 +0000
Revision:
0:1465fd20e75b
Child:
1:83459533ff72
four holes and treasure and man

Who changed what in which revision?

UserRevisionLine numberNew contents of line
weixitao 0:1465fd20e75b 1 #include "Treasure.h"
weixitao 0:1465fd20e75b 2 #include "N5110.h"
weixitao 0:1465fd20e75b 3 extern N5110 lcd;
weixitao 0:1465fd20e75b 4
weixitao 0:1465fd20e75b 5 void Treasure::treasure_place()
weixitao 0:1465fd20e75b 6 {
weixitao 0:1465fd20e75b 7
weixitao 0:1465fd20e75b 8
weixitao 0:1465fd20e75b 9 TreasureX = rand()%70+5;
weixitao 0:1465fd20e75b 10 TreasureY = rand()%30+5;
weixitao 0:1465fd20e75b 11
weixitao 0:1465fd20e75b 12 }
weixitao 0:1465fd20e75b 13
weixitao 0:1465fd20e75b 14 void Treasure::treasure_show()
weixitao 0:1465fd20e75b 15 {
weixitao 0:1465fd20e75b 16
weixitao 0:1465fd20e75b 17 lcd.drawRect(TreasureX,TreasureY,10,8,FILL_BLACK);
weixitao 0:1465fd20e75b 18 lcd.drawRect(TreasureX+2,TreasureY+1,6,4,FILL_WHITE);
weixitao 0:1465fd20e75b 19 lcd.drawRect(TreasureX+4,TreasureY+2,2,2,FILL_BLACK);
weixitao 0:1465fd20e75b 20
weixitao 0:1465fd20e75b 21 }