/** * Asserts a condition is true, throws and breaks the game if not * @param {boolean} condition - The condition to check * @param {string} message - Error message if assertion fails * @throws {Error} Throws an error if the condition is false */ export function assert(condition, message) { if (!condition) { const error = new Error(`Assertion failed: ${message}`); console.error(error); throw error; } }