added alternate game mode "movingWalls"
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
|
||||
import { MovingRectangle } from "./class/Rectangle.js";
|
||||
|
||||
function random(min: number = 0, max: number = 1) {
|
||||
return Math.random() * (max - min) + min;
|
||||
}
|
||||
@@ -16,4 +18,9 @@ function clamp(n: number, min: number, max: number) : number
|
||||
return (n);
|
||||
}
|
||||
|
||||
export {random, sleep, clamp}
|
||||
function assertMovingRectangle(value: unknown): asserts value is MovingRectangle {
|
||||
// if (value !== MovingRectangle) throw new Error("Not a MovingRectangle");
|
||||
return;
|
||||
}
|
||||
|
||||
export {random, sleep, clamp, assertMovingRectangle}
|
||||
|
||||
Reference in New Issue
Block a user