|
|
|
@ -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) { |
|
|
|
|