21 static const int _max_nof_players = 6;
22 static const int _min_nof_players = 3;
24 std::vector<player*> _players;
48 std::vector<player*>& players,
68 int get_number_of_turns();
69 void determine_trump_color();
77 bool is_started()
const;
78 bool is_finished()
const;
79 bool is_estimation_phase()
const;
81 int get_round_number()
const;
82 int get_trick_number()
const;
83 int get_trick_estimate_sum()
const;
84 int get_max_round_number()
const;
85 int get_trump_color()
const;
86 player* get_current_player()
const;
87 player* get_trick_starting_player()
const;
88 player* get_starting_player()
const;
89 trick* get_trick()
const;
90 std::vector<player*>& get_players();
99 bool start_game(std::string& err);
100 bool finish_game(std::string& err);
102 void setup_round(std::string& err);
103 void wrap_up_round(std::string& err);
104 bool estimate_tricks(
player *
player, std::string &err,
int trick_estimate);
106 bool play_card(
player*
player,
const std::string& card_id, std::string& err);
107 bool update_current_player(std::string& err);
112 void write_into_json(rapidjson::Value& json, rapidjson::Document::AllocatorType& allocator)
const override;
113 static game_state* from_json(
const rapidjson::Value& json);