A bit more cleaning up of the gui and fsm, probaby done.

This commit is contained in:
Zed A. Shaw 2025-02-21 01:04:32 -05:00
parent dd4f77a106
commit 6c1d851e85
3 changed files with 12 additions and 5 deletions

View file

@ -90,8 +90,14 @@ namespace gui {
}
// this could be an optional that returs a Point
bool MainUI::play_move() {
return $camera.play_move($rayview);
std::optional<Point> MainUI::play_move() {
if($camera.play_move($rayview)) {
return std::make_optional<Point>({
size_t($camera.target_x),
size_t($camera.target_y)});
} else {
return std::nullopt;
}
}
void MainUI::plan_rotate(int dir) {