From 9cc4a3ca144332166c8b63f95c85ac6395698237 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Sun, 5 Dec 2010 06:58:43 +0100 Subject: Renamed target types. --- server/player.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'server') diff --git a/server/player.cpp b/server/player.cpp index 7e890fb..b6776df 100644 --- a/server/player.cpp +++ b/server/player.cpp @@ -51,18 +51,18 @@ Actions Game::Player::get_actions_draw() { // List all tiles that can be discarded. for(std::size_t i = 0; i < hand.size(); i++) { - possible_actions.push_back(Action(Action::Discard, Action::Hand, i)); + possible_actions.push_back(Action(Action::Discard, Action::Index, i)); } } else { if(tenpai_indexes) { for(List::iterator it = tenpai_indexes.begin(); it != tenpai_indexes.end(); it++) { - possible_actions.push_back(Action(Action::Discard, Action::Hand, *it)); + possible_actions.push_back(Action(Action::Discard, Action::Index, *it)); } tenpai_indexes.clear(); } else { // Only tile that can be discarded is the last drawn one. - possible_actions.push_back(Action(Action::Discard, Action::Hand, hand.size() - 1)); + possible_actions.push_back(Action(Action::Discard, Action::Index, hand.size() - 1)); } } @@ -78,7 +78,7 @@ Actions Game::Player::get_actions_discard(Tile tile, PlayerNum discarder) { Targets targets = can_chi(tile); if(!targets.empty()) { for(Targets::iterator it = targets.begin(); it != targets.end(); it++) { - possible_actions.push_back(Action(Action::Chi, Action::Hand, *it)); + possible_actions.push_back(Action(Action::Chi, Action::Index, *it)); } } } @@ -86,11 +86,11 @@ Actions Game::Player::get_actions_discard(Tile tile, PlayerNum discarder) { // Check if tile can be called for a pon. int target = can_pon(tile); if(target > 0) { - possible_actions.push_back(Action(Action::Pon, Action::Hand, target + 1)); + possible_actions.push_back(Action(Action::Pon, Action::Index, target + 1)); // Check if tile can be called for a kan. if(can_kan(tile, target)) { - possible_actions.push_back(Action(Action::Kan, Action::Hand, target + 2)); + possible_actions.push_back(Action(Action::Kan, Action::Index, target + 2)); } } } -- cgit v1.2.3