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.
Diff: Engine/Engine.cpp
- Revision:
- 4:6353f829c56c
- Parent:
- 3:6253a2d374fa
- Child:
- 5:a3a9e0417e04
--- a/Engine/Engine.cpp Sun Apr 29 14:19:38 2018 +0000 +++ b/Engine/Engine.cpp Sun Apr 29 14:59:14 2018 +0000 @@ -28,7 +28,7 @@ for (int j = 0; j < 22; j++) { for (int i = 0; i < 22; i++) { if (_grid[i][j] != 0) { - lcd.drawRect(2 * i + 1,2 * j + 1,2,2,FILL_BLACK); + lcd.drawRect((2 * i) + 2,(2 * j) + 2,2,2,FILL_BLACK); } } } @@ -38,11 +38,11 @@ { memset(_grid, 0, sizeof(_grid)); - _solid.update(_d); - int tempX = _solid.getX(); - int tempY = _solid.getY(); + int _l =_solid.getLength(); - _grid[tempX][tempY] = 1; + for (int i = _l; i >= 1; i--) { + _grid[_solid.getX(i)][_solid.getY(i)] = 1; + } }