All there but errors need fixing

Dependencies:   mbed

Overview:

Rookie Tetris is a jigsaw style game based on the classic Tetris.

A block will appear at the top of the screen, you must move it (your options for movement are left, right and down - you cannot move up the board). The block will stop when it if placed either on the floor of the board or on-top of another block.

Your goal is to fill a complete row of the board with the blocks; when you do so the row will delete and the pattern above it will drop down. The game is over when your pattern is tall enough to reach to the top of the board!

Controls:

Use the joystick to move your block! Your block cannot move out of the parameters of the board.

Pot 2 controls the contrast of the screen.

Committer:
el18rs
Date:
Wed Jun 03 22:27:46 2020 +0000
Revision:
26:00e1a6076038
Parent:
25:a7c89c54454a
Final Submission. I have read and agreed with Statement of Academic Integrity.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
el18rs 3:522c6f850e91 1 #ifndef TETROMINO_H
el18rs 3:522c6f850e91 2 #define TETROMINO_H
el18rs 3:522c6f850e91 3
el18rs 3:522c6f850e91 4 #include "mbed.h"
el18rs 3:522c6f850e91 5 #include "N5110.h"
el18rs 3:522c6f850e91 6 #include "Gamepad.h"
el18rs 3:522c6f850e91 7
el18rs 25:a7c89c54454a 8 /** Tetromino Class
el18rs 25:a7c89c54454a 9 * @brief Creates Blocks to be moved on screen
el18rs 25:a7c89c54454a 10 * @author Ruby Smith
el18rs 25:a7c89c54454a 11 * @date May 2020
el18rs 25:a7c89c54454a 12 */
el18rs 25:a7c89c54454a 13
el18rs 3:522c6f850e91 14 class Tetromino
el18rs 3:522c6f850e91 15 {
el18rs 3:522c6f850e91 16 public:
el18rs 3:522c6f850e91 17
el18rs 25:a7c89c54454a 18 /** Constructor */
el18rs 23:cbfa9d1ee3db 19 Tetromino();
el18rs 25:a7c89c54454a 20 /** Destructor */
el18rs 23:cbfa9d1ee3db 21 ~Tetromino();
el18rs 23:cbfa9d1ee3db 22 void init(int x, int y);
el18rs 23:cbfa9d1ee3db 23 void draw(N5110 &lcd);
el18rs 23:cbfa9d1ee3db 24 void update(Direction d, float mag);
el18rs 23:cbfa9d1ee3db 25 Vector2D get_pos();
el18rs 23:cbfa9d1ee3db 26 Vector2D get_velocity();
el18rs 3:522c6f850e91 27
el18rs 3:522c6f850e91 28 private:
el18rs 3:522c6f850e91 29
el18rs 23:cbfa9d1ee3db 30 Vector2D _velocity;
el18rs 4:7ddd287a5d28 31
el18rs 23:cbfa9d1ee3db 32 int _x;
el18rs 23:cbfa9d1ee3db 33 int _y;
el18rs 23:cbfa9d1ee3db 34 int _speed;
el18rs 3:522c6f850e91 35
el18rs 3:522c6f850e91 36 };
el18rs 23:cbfa9d1ee3db 37 #endif