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: Block.cpp
- Revision:
- 2:891b3618be4f
- Parent:
- 1:bb1507f0bb64
- Child:
- 4:f1e33a234a74
--- a/Block.cpp Fri May 01 09:22:50 2015 +0000 +++ b/Block.cpp Fri May 01 10:12:55 2015 +0000 @@ -0,0 +1,32 @@ + +#include "Block.h" +//*********************point class************************// + +Block :: Block (int xi, int yi, int zi, int sizei, int heighti){ + x = xi; + y = yi; + z = zi; + size = sizei; + height = heighti; +} +Block :: Block (){ + x = 0; + y = 0; + z = 0; + size = 0; + height = 0; +} + + +void Block :: moveRight(){ + x = (x + 1) % 360; +} +void Block :: moveLeft(){ + x = (x - 1) % 360; +} +void Block :: moveIn(){ + y--; +} +void Block :: moveOut(){ + y++; +} \ No newline at end of file