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: N5110 mbed PowerControl
Diff: GameScreen.cpp
- Revision:
- 1:3305d7e44880
- Parent:
- 0:c2c1df1163f1
- Child:
- 2:d4402bc3dd45
--- a/GameScreen.cpp Sat Mar 07 01:49:37 2015 +0000 +++ b/GameScreen.cpp Sat Mar 07 09:58:29 2015 +0000 @@ -2,4 +2,31 @@ #include "N5110.h" #include "GameScreen.h" -//void GameScreen::moveBall(int xPos,int yPos){} \ No newline at end of file +//need to extend on initialization to set some variables +void GameScreen::Initialize() +{ + init(); + + platGapSize = 4; + platThickness = 2; + maxX_ = 48; + maxY_ = 84; + + +} + +//draw platform +// ___________ ________ < y +// ^ x +void GameScreen::drawPlatform(int x,int y) +{ + + + for (int a = 0; a < 48; a ++) + { + for (int b = y; b < (y+platThickness); b++) + { + setPixel(b,a); + } + } +} \ No newline at end of file