Move the board code out to ui as it's only for board visualisation
This commit is contained in:
parent
a17a9db2ad
commit
2abd4ad832
9 changed files with 39 additions and 13 deletions
14
game/game.h
14
game/game.h
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue