ELEC2645 (2018/19) / Mbed 2 deprecated el17ajf

Dependencies:   mbed

Fork of el17ajf by Angus Findlay

Revision:
41:91b0c73b9e02
Parent:
34:0bb0d010e755
diff -r 052819060e38 -r 91b0c73b9e02 Tetromino/Tetromino.h
--- a/Tetromino/Tetromino.h	Tue Apr 30 09:19:13 2019 +0000
+++ b/Tetromino/Tetromino.h	Thu May 09 12:10:29 2019 +0000
@@ -90,8 +90,35 @@
     Tetromino teleportedTo(int x);
     
 private:
+
+    /**
+     * @brief Returns a new immutable tetromino, translated by [dx, dy]
+     * @param dx The amount to translate by on the X axis
+     * @param dy The amount to translate by on the Y axis
+     * @returns The tetromino translated by [dx, dy]
+     */
     Tetromino translated(int dx, int dy);
+    
+    /**
+     * @brief Returns a tetromino based on an input string representation, 
+     * where a '*' represents a block, and a space represents nothing. For
+     * example "* ***  " represents:
+     * "* "
+     * "**"
+     * "* "
+     * "  ", so the T shaped tetromino will be used.
+     * @param str The string representation of the block as described above.
+     * @returns The tetromino represented by the string.
+     */
     static Tetromino getTetrominoFromString(const char * str);
+    
+    /**
+     * @brief Constructor for a tetromino with 4 blocks
+     * @param a The first block
+     * @param a The second block
+     * @param a The third block
+     * @param a The fourth block
+     */
     Tetromino(Block a, Block b, Block c, Block d);
 };
 #endif
\ No newline at end of file