diff options
author | Stephen Enders <smenders@gmail.com> | 2021-01-29 18:12:04 -0500 |
---|---|---|
committer | Stephen Enders <smenders@gmail.com> | 2021-01-29 18:12:04 -0500 |
commit | bf74001c193ae18cf208f57c145e8c9b8b88c7e8 (patch) | |
tree | 04d60fd18b6590e909bcbc489e953a0a544d774c /src/helper.hpp | |
parent | 6f3e64619980c87cf5d4cceff0b4546fb0aa6ae7 (diff) |
Allow player to pass when no available moves
If the player has NO legal moves display the pass option
Diffstat (limited to 'src/helper.hpp')
-rw-r--r-- | src/helper.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/helper.hpp b/src/helper.hpp index b56dc30..f7d6b8d 100644 --- a/src/helper.hpp +++ b/src/helper.hpp @@ -117,9 +117,10 @@ canMovePiece(std::shared_ptr<struct piece_t> piece, std::shared_ptr<std::vector<struct piece_t>> myPieces, std::shared_ptr<std::vector<struct piece_t>> enemyPieces); -std::vector<int> -getLegalMoves(std::shared_ptr<struct player_t> activePlayer, - std::shared_ptr<struct player_t> opponent); +bool +hasMoves(std::shared_ptr<struct player_t> activePlayer, + std::shared_ptr<struct player_t> opponent, + int roll); sf::Vector2f pos(float c, float r); |