cleanup in Player.cc file, Alma och Malin
authorAlma Dejus <almde515@student.liu.se>
Mon, 11 Dec 2023 09:03:12 +0000 (10:03 +0100)
committerAlma Dejus <almde515@student.liu.se>
Mon, 11 Dec 2023 09:03:12 +0000 (10:03 +0100)
src/Player.cc

index cec7c490d8efefb32ca4a966739c9db166778bc4..670f05e29ee2fb2425715576b86ee49df5851747 100644 (file)
@@ -4,7 +4,7 @@
 #include "Context.h"
 #include "constants.h"
 
-Player::Player(sf::Texture& player_txtr, sf::Texture& sack_txtr, json& params) :
+Player::Player(sf::Texture& player_txtr, sf::Texture& sack_txtr, json& params):
     collected{0},
     rotation{params["degrees_per_second"]},
     tumble_degrees{0},
@@ -93,7 +93,7 @@ void Player::update(Context& context)
 
 void Player::move(bool forward) 
 {
-    position += static_cast<float>(pow(-1, forward - 1)) * max_speed * direction;
+    position += static_cast<float>(pow(-1, forward - 1)) * max_speed*direction;
     sprite.setPosition(position);
     sack.setPosition(position + sack_offset);
 }