summaryrefslogtreecommitdiff
path: root/src/game_state.cpp
diff options
context:
space:
mode:
authorJustin Worthe <justin.worthe@gmail.com>2015-06-06 17:16:44 +0200
committerJustin Worthe <justin.worthe@gmail.com>2015-06-06 17:16:44 +0200
commit720edc0849aa69e1c944ac7a32ebcbe2ff1e4bf0 (patch)
tree577b1cc3455c7e5a25506f9194f9e6b7132e3839 /src/game_state.cpp
parentc85ebd55fe327125fd4d53d3b62d2b4f145a07a5 (diff)
Fixed indentation to be all spaces
Diffstat (limited to 'src/game_state.cpp')
-rw-r--r--src/game_state.cpp70
1 files changed, 35 insertions, 35 deletions
diff --git a/src/game_state.cpp b/src/game_state.cpp
index 861471b..e8151e3 100644
--- a/src/game_state.cpp
+++ b/src/game_state.cpp
@@ -19,37 +19,37 @@ GameState::GameState(std::string mapFilename)
for (int x=-1; y <= GAME_AREA_LINES; ++x)
{
char nextChar = mapFile.get();
- if (nextChar == EOF)
- {
- break;
- }
+ if (nextChar == EOF)
+ {
+ break;
+ }
- switch (nextChar)
- {
- case Alien::MAP_CHAR:
- aliens.push_back(Alien(x,y));
- break;
- case EnemyBullet::ALIEN_MAP_CHAR:
- case EnemyBullet::ENEMY_MISSILE_MAP_CHAR:
- bullets.push_back(EnemyBullet(x,y));
- break;
- case PlayerMissile::MAP_CHAR:
- missiles.push_back(PlayerMissile(x,y));
- break;
- case Shield::MAP_CHAR:
- shields.push_back(Shield(x,y));
- break;
- case Spaceship::ENEMY_MAP_CHAR:
- case Spaceship::PLAYER_MAP_CHAR:
- spaceships.push_back(Spaceship(x+1,y));
- x += 2;
- mapFile.ignore(2);
- break;
- case '\n':
- ++y;
- x = -1;
- break;
- }
+ switch (nextChar)
+ {
+ case Alien::MAP_CHAR:
+ aliens.push_back(Alien(x,y));
+ break;
+ case EnemyBullet::ALIEN_MAP_CHAR:
+ case EnemyBullet::ENEMY_MISSILE_MAP_CHAR:
+ bullets.push_back(EnemyBullet(x,y));
+ break;
+ case PlayerMissile::MAP_CHAR:
+ missiles.push_back(PlayerMissile(x,y));
+ break;
+ case Shield::MAP_CHAR:
+ shields.push_back(Shield(x,y));
+ break;
+ case Spaceship::ENEMY_MAP_CHAR:
+ case Spaceship::PLAYER_MAP_CHAR:
+ spaceships.push_back(Spaceship(x+1,y));
+ x += 2;
+ mapFile.ignore(2);
+ break;
+ case '\n':
+ ++y;
+ x = -1;
+ break;
+ }
}
}
@@ -57,22 +57,22 @@ void GameState::logState()
{
for (auto alien : aliens)
{
- std::cout << "Alien " << alien.coords() << std::endl;
+ std::cout << "Alien " << alien.coords() << std::endl;
}
for (auto bullet : bullets)
{
- std::cout << "Enemy Bullet" << bullet.coords() << std::endl;
+ std::cout << "Enemy Bullet" << bullet.coords() << std::endl;
}
for (auto missile : missiles)
{
- std::cout << "Player Missile" << missile.coords() << std::endl;
+ std::cout << "Player Missile" << missile.coords() << std::endl;
}
for (auto shield : shields)
{
- std::cout << "Shield" << shield.coords() << std::endl;
+ std::cout << "Shield" << shield.coords() << std::endl;
}
for (auto spaceship : spaceships)
{
- std::cout << "Spaceship" << spaceship.coords() << std::endl;
+ std::cout << "Spaceship" << spaceship.coords() << std::endl;
}
}