summaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/player.cpp12
1 files changed, 6 insertions, 6 deletions
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<int>::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));
}
}
}