diff options
author | Stephen Enders <smenders@gmail.com> | 2021-01-29 18:24:54 -0500 |
---|---|---|
committer | Stephen Enders <smenders@gmail.com> | 2021-01-29 18:24:54 -0500 |
commit | b9feff41c80a8d528de79555f2449afc0147ba52 (patch) | |
tree | 9211068ddc180ff7e4428741efadf37675c9c322 | |
parent | 8e4dd29a52f79cfd3b652e5e16430438e6ad6b4f (diff) |
Only allow moves based on position + roll
-rw-r--r-- | src/ur.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -346,8 +346,11 @@ main() } } grabbed_piece->sprite.setPosition(s.getPosition()); - grabbed_piece->position = bp.position; - in_place = true; + + if (bp.position == (grabbed_piece->position + turn_roll)) { + grabbed_piece->position = bp.position; + in_place = true; + } break; } } @@ -372,6 +375,7 @@ main() } } } + if (!reroll) { next_turn(roll_sprites); } else { |