Skip to content

Commit

Permalink
Introducing common player definitions #21
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaudic committed Jan 26, 2020
1 parent 02b8e31 commit 29729c7
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
39 changes: 39 additions & 0 deletions src/common/commonplayer.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* \file commonplayer.hpp
* \brief Common definitions for a player in client and server side
* \author G. B.
* \version 0.1a
* \date 25/01/2020
*/
/* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
* If a copy of the MPL was not distributed with this file,
* You can obtain one at http://mozilla.org/MPL/2.0/.
*
* This Source Code Form is "Incompatible With Secondary Licenses",
* as defined by the Mozilla Public License, v. 2.0.
*/

#ifndef _H_COMMONPLAYER_
#define _H_COMMONPLAYER_

#include <string>
#include <SDL2/SDL.h>

enum class PlayerLevel {
ROOKIE,
WOOD_HAMMER,
WOOD_HAMMER2,
STONE_HAMMER,
STONE_HAMMER2, // TBC
ADMIN
};

struct PlayerBasicInfo {
std::string name;
PlayerLevel level;
Uint32 points;
Uint32 gold;
Uint32 cash;
};

#endif //! _H_COMMONPLAYER_
6 changes: 6 additions & 0 deletions src/common/commonroom.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ enum class RoomStatus {
PLAYING //! game being played
};

enum class SuddenDeathType {
BIGBOMB,
DOUBLE,
SS
};

struct RoomBasicInfo {
Uint16 number;
std::string name;
Expand Down

0 comments on commit 29729c7

Please sign in to comment.