summaryrefslogtreecommitdiff
path: root/HumanPlayer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'HumanPlayer.cpp')
-rw-r--r--HumanPlayer.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/HumanPlayer.cpp b/HumanPlayer.cpp
index d13bc6b..02bda69 100644
--- a/HumanPlayer.cpp
+++ b/HumanPlayer.cpp
@@ -123,4 +123,28 @@ void HumanPlayer::drawHandler(void)
*********************************************************************/
enum tPlayerState HumanPlayer::selectUnit(void)
{
+ for (size_t szUnit = 0; szUnit < MAX_UNITS; szUnit++)
+ {
+ /* Select Unit object from internal table. */
+ Unit& u = _unitsMap[szUnit];
+
+ if (u.isAlive())
+ {
+ if (not u.isSelected())
+ {
+ /* Extract Unit object X position. */
+ const uint16_t x = u.getX();
+
+#error ("TODO")
+ }
+ else
+ {
+ /* Unit is already selected. Continue. */
+ }
+ }
+ else
+ {
+ /* Unit is not alive. Continue. */
+ }
+ }
}