|
@ -54,7 +54,7 @@ class GameManagerTest { |
|
|
GameManager gameManager = new GameManager(); |
|
|
GameManager gameManager = new GameManager(); |
|
|
gameManager.player.position = gameManager.ghosts[0].position.Clone(); |
|
|
gameManager.player.position = gameManager.ghosts[0].position.Clone(); |
|
|
//act |
|
|
//act |
|
|
boolean collision = gameManager.GhostPlayerColisionTest(); |
|
|
|
|
|
|
|
|
boolean collision = gameManager.GhostPlayerCollisionTest(); |
|
|
boolean expected = true; |
|
|
boolean expected = true; |
|
|
|
|
|
|
|
|
// assert |
|
|
// assert |
|
@ -69,11 +69,11 @@ class GameManagerTest { |
|
|
gameManager.player.position = new Vector2(2,3); |
|
|
gameManager.player.position = new Vector2(2,3); |
|
|
gameManager.ghosts[0].position = new Vector2(4,5); |
|
|
gameManager.ghosts[0].position = new Vector2(4,5); |
|
|
//act |
|
|
//act |
|
|
boolean colision = gameManager.GhostPlayerColisionTest(); |
|
|
|
|
|
|
|
|
boolean collision = gameManager.GhostPlayerCollisionTest(); |
|
|
boolean expected = false; |
|
|
boolean expected = false; |
|
|
|
|
|
|
|
|
// assert |
|
|
// assert |
|
|
assertThat(colision).isEqualTo(expected); |
|
|
|
|
|
|
|
|
assertThat(collision).isEqualTo(expected); |
|
|
} |
|
|
} |
|
|
@Test |
|
|
@Test |
|
|
void GameManager_setupgame_spawnsghosts() { |
|
|
void GameManager_setupgame_spawnsghosts() { |
|
|