| 799 | _ctx.controller->set_last_dir(Enums::Map::Direction::EAST); |
| 800 | _ctx.controller->set_can_undo(false); |
| 801 | |
| 802 | const auto at{_ctx.game->state->get_player_pos()}; |
| 803 | if (_ctx.game->state->level->at(at).has_spinner()) { |
| 804 | |
| 805 | auto new_facing{static_cast<Enums::Map::Direction>( |
| 806 | _ctx.get_random(Enums::System::Random::ZERO_TO_3))}; |
| 807 | _ctx.game->state->set_player_facing(new_facing); |
| 808 | |
| 809 | DEBUG_LOG("Player triggered spinner"); |
| 810 | } |
| 811 | } |
| 812 | |
| 813 | auto Sorcery::Engine::_turn_around() -> void { |
| 814 | |
| 815 | switch (_ctx.game->state->get_player_facing()) { |
| 816 | using enum Enums::Map::Direction; |
| 817 | case NORTH: |
| 818 | _ctx.game->state->set_player_facing(SOUTH); |
| 819 | break; |
| 820 | case SOUTH: |
| 821 | _ctx.game->state->set_player_facing(NORTH); |
| 822 | break; |
| 823 | case EAST: |
| 824 | _ctx.game->state->set_player_facing(WEST); |
| 825 | break; |
| 826 | case WEST: |
| 827 | _ctx.game->state->set_player_facing(EAST); |
| 828 | break; |
| 829 | default: |
| 830 | break; |
| 831 | } |
| 832 | |
| 833 | _ctx.controller->set_last_dir(Enums::Map::Direction::SOUTH); |
| 834 | _ctx.controller->set_can_undo(false); |
| 835 | |
| 836 | const auto at{_ctx.game->state->get_player_pos()}; |
nothing calls this directly
no test coverage detected