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
Cube/Cube.h@14:885915260e25, 2019-03-31 (annotated)
- Committer:
- el17cd
- Date:
- Sun Mar 31 13:55:51 2019 +0000
- Revision:
- 14:885915260e25
- Parent:
- 11:2cd6341136ca
- Child:
- 16:64cd7bc094f9
Added score and ensured players cannot hold left/right and win (at current; speed)
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
el17cd | 4:759a5c34e239 | 1 | #include "mbed.h" |
el17cd | 4:759a5c34e239 | 2 | #ifndef FACE_H |
el17cd | 4:759a5c34e239 | 3 | #define FACE_H |
el17cd | 4:759a5c34e239 | 4 | #include "Face.h" |
el17cd | 4:759a5c34e239 | 5 | #endif |
el17cd | 4:759a5c34e239 | 6 | |
el17cd | 4:759a5c34e239 | 7 | class Cube { |
el17cd | 4:759a5c34e239 | 8 | private: |
el17cd | 7:15543cb10a14 | 9 | double verticies[8][3]; |
el17cd | 4:759a5c34e239 | 10 | Face faces[6]; |
el17cd | 10:07a23afd5088 | 11 | double xPos, yPos, zPos; |
el17cd | 4:759a5c34e239 | 12 | public: |
el17cd | 7:15543cb10a14 | 13 | Cube(double x, double y, double z, double size); |
el17cd | 4:759a5c34e239 | 14 | Face getFace(int index); |
el17cd | 14:885915260e25 | 15 | void updateFaceVerticies(double (&verticies)[8][3]); |
el17cd | 11:2cd6341136ca | 16 | bool tooClose(); |
el17cd | 7:15543cb10a14 | 17 | void rotateX(double angle); |
el17cd | 8:a667bc5050c1 | 18 | void rotateY(double angle); |
el17cd | 11:2cd6341136ca | 19 | void rotateZ(double angle); |
el17cd | 7:15543cb10a14 | 20 | void translate(double x, double y, double z); |
el17cd | 10:07a23afd5088 | 21 | bool despawn(); |
el17cd | 4:759a5c34e239 | 22 | }; |