From 183ec6fde3df1475622d32570491c710fdf4b4e0 Mon Sep 17 00:00:00 2001 From: Christopher Date: Tue, 28 Feb 2023 20:19:54 +1300 Subject: [PATCH] added a note on how to calculate --- 84_Super_Star_Trek/rust/src/main.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/84_Super_Star_Trek/rust/src/main.rs b/84_Super_Star_Trek/rust/src/main.rs index 3fcf9632..46e932c3 100644 --- a/84_Super_Star_Trek/rust/src/main.rs +++ b/84_Super_Star_Trek/rust/src/main.rs @@ -47,6 +47,8 @@ fn gather_dir_and_speed_then_move(galaxy: &mut Galaxy) { // if passing a boundary, test for the next quadrant in that direction // if present, change quadrant and move to border // else stop. + // one way to sort this would be to convert current pos to a galaxy pos (e.g. sector.x, y * 8), + // add dist, then mod/divide to get quadrant and new sector } fn prompt(prompt_text: &str) -> String {