Skip to content

Commit

Permalink
Merge branch 'main' of github.com:DanieleMerighi/OOP23-bombardero
Browse files Browse the repository at this point in the history
  • Loading branch information
bagarozzi committed Jul 8, 2024
2 parents 66199a2 + b82981a commit 0b1a878
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/test/java/it/bombardero/TestPlayer.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,13 @@ void testPlayerMovingDirections() {
// Setting the number of update and calling them
final int updateNumeber = FPS; // Number of updates done
IntStream.range(0, updateNumeber)
.forEach(n -> this.manager.getPlayers().get(playerIndex).update(manager, STANDARD_ELAPSED_TIME, CharacterType.PLAYER));
.forEach(n -> this.manager.getPlayers().get(playerIndex).update(manager, STANDARD_ELAPSED_TIME,
CharacterType.PLAYER));

roundPlayerCoordinateToThreeDecimal();
// Sums the spawn coordinates with the movement done
final GenPair<Float, Float> tempCoord = expectedCoord.apply(Functions.sumFloat(calculateExpectedDeltaMovement(updateNumeber)));
final GenPair<Float, Float> tempCoord = expectedCoord
.apply(Functions.sumFloat(calculateExpectedDeltaMovement(updateNumeber)));
expectedCoord = tempCoord;

assertEquals(expectedCoord, manager.getPlayers().get(playerIndex).getCharacterPosition());
Expand Down

0 comments on commit 0b1a878

Please sign in to comment.