bettola/srv/game/player.h
Ritchie Cunningham bd6281c9bc feat(server): Implement server-side game state.
* Added Player class to represent players on the server.
* Added Game class to manage the overall game state.
* Server now adds new players to the game state when they connect.
* Server now updates the players position in the game state on receiving
  a PlayerPosMessage.
2025-09-13 17:10:55 +01:00

18 lines
333 B
C++

#pragma once
#include "bettola/network/socket.h"
class Player {
public:
Player(BettolaLib::Network::Socket* socket);
void set_position(float x, float y) { _x = x; _y = y; }
BettolaLib::Network::Socket& get_socket(void) const { return *_socket; }
private:
float _x;
float _y;
BettolaLib::Network::Socket* _socket;
};