Move the board code out to ui as it's only for board visualisation

This commit is contained in:
Marc Di Luzio 2014-12-16 13:12:58 +00:00
parent a17a9db2ad
commit 2abd4ad832
9 changed files with 39 additions and 13 deletions

View file

@ -1,7 +1,7 @@
#ifndef _GAME_H_
#define _GAME_H_
#include "board.h"
#include "unit.h"
#include "gametypes.h"
#include "orders.h"
@ -27,10 +27,16 @@ public:
bool NextTurn();
// Get the number of units
inline unsigned int GetNumUnits() const { return m_orders.size(); }
inline unsigned int GetNumUnits() const { return m_allUnits.size(); }
// Get unit by index as above (not unit ID)
inline const CUnit& GetUnitByIndex( unsigned int i ) const { return *m_orders[i]; }
inline const CUnit& GetUnitByIndex( unsigned int i ) const { return *m_allUnits[i]; }
// Get the number of order
inline unsigned int GetNumOrders() const { return m_orders.size(); }
// Get orders by index as above
inline const COrder& GetOrdersByIndex( unsigned int i ) const { return m_orders[i]; }
private:
@ -39,7 +45,7 @@ private:
// Simulate all actions
bool SimulateActions();
// Vector to store points to all units
sharedUnitVector_t m_allUnits;