increased game length, balanced attacks

This commit is contained in:
evanpelle
2024-08-16 14:48:51 -07:00
parent 51c05f9d10
commit d12ebc5f4b
8 changed files with 59 additions and 31 deletions
+4
View File
@@ -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);
}