public IEnumerator OneSettlerPerTile() { m_player.AddUnitToPlayer(m_settlerUnitPrefab, new MapIndex(2, 1)); SettlerUnit settlerUnit2 = m_player.GetUnits()[m_player.GetUnits().Count - 1].GetComponent <SettlerUnit>(); Assert.True(settlerUnit2.GetCurrentTile() == m_mapGrid.GetTile(new MapIndex(2, 1))); m_player.SelectUnit(new MapIndex(2, 1)); m_player.SelectUnit(m_settlerUnit.GetCurrentTile().GetTileID()); Assert.True(m_settlerUnit.GetCurrentTile() != settlerUnit2.GetCurrentTile()); yield return(null); }
public IEnumerator MovementTest() { Tile startTile = m_mapGrid.GetTile(new MapIndex(1, 1)); m_settlerUnit.SetCurrentTile(startTile); m_player.SelectUnit(new MapIndex(1, 1)); m_player.SelectUnit(new MapIndex(3, 1)); m_player.TurnEnd(); Tile endTile = m_settlerUnit.GetCurrentTile(); Assert.True(startTile != endTile); Assert.True(endTile == m_mapGrid.GetTile(new MapIndex(3, 1))); yield return(null); }