mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-07-23 09:22:43 +00:00
increased game length, balanced attacks
This commit is contained in:
@@ -2,4 +2,8 @@ import {Cell} from "./Game";
|
||||
|
||||
export function manhattanDist(c1: Cell, c2: Cell): number {
|
||||
return Math.abs(c1.x - c2.x) + Math.abs(c1.y - c2.y);
|
||||
}
|
||||
|
||||
export function within(value: number, min: number, max: number): number {
|
||||
return Math.min(Math.max(value, min), max);
|
||||
}
|
||||
Reference in New Issue
Block a user