#pragma once

#include <frostbite2D/types/type_math.h>
#include <vector>

namespace ns_game {

struct PlatformWorld {
  float levelLeft = 0.0f;
  float levelRight = 1280.0f;
  std::vector<frostbite2D::Rect> platforms;
};

struct MovementBody {
  frostbite2D::Vec2 position;
  frostbite2D::Vec2 size;
  frostbite2D::Vec2 velocity;
  bool grounded = false;
};

class PlatformMover {
public:
  MovementBody Step(const MovementBody& body, const PlatformWorld& world,
                    float gravity, float deltaTime) const;
};

} // namespace ns_game
