mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2025-12-26 20:53:23 -08:00
* move common server files * update includes with move * create participant, move code * fix linker errors * fix regressions * mark function as override to make clang happy * split out spectator to new file * forgot to add to cmakelists * autocompleter picking wrong casing for var name * clean up forwards declarations in player * fix includes in game
34 lines
653 B
C++
34 lines
653 B
C++
#ifndef SERVER_PLAYER_REFERENCE_H
|
|
#define SERVER_PLAYER_REFERENCE_H
|
|
|
|
class PlayerReference
|
|
{
|
|
private:
|
|
int roomId;
|
|
int gameId;
|
|
int playerId;
|
|
|
|
public:
|
|
PlayerReference(int _roomId, int _gameId, int _playerId) : roomId(_roomId), gameId(_gameId), playerId(_playerId)
|
|
{
|
|
}
|
|
int getRoomId() const
|
|
{
|
|
return roomId;
|
|
}
|
|
int getGameId() const
|
|
{
|
|
return gameId;
|
|
}
|
|
int getPlayerId() const
|
|
{
|
|
return playerId;
|
|
}
|
|
bool operator==(const PlayerReference &other)
|
|
{
|
|
return ((roomId == other.roomId) && (gameId == other.gameId) && (playerId == other.playerId));
|
|
}
|
|
};
|
|
|
|
#endif
|