start on jumping to next system

This commit is contained in:
Tenari
2026-03-05 08:09:23 -06:00
parent b8daf6cbc8
commit 31c6b492c1
3 changed files with 121 additions and 15 deletions
+7
View File
@@ -457,4 +457,11 @@ static const char* MESSAGE_STRINGS[] = {
"TransactionResult",
};
fn u32 fuelCostForTravel(u32 drive_efficiency, Pos2 current, Pos2 dest) {
u32 x_distance = Max(current.x, dest.x) - Min(current.x, dest.x);
u32 y_distance = Max(current.y, dest.y) - Min(current.y, dest.y);
u32 fuel_per_dist = 100 - drive_efficiency;
return (x_distance + y_distance) * fuel_per_dist;
}
#endif //GAMESHARED_H