diff --git a/src/commands/extrasGame.ts b/src/commands/extrasGame.ts index 908f1df..3d85b32 100644 --- a/src/commands/extrasGame.ts +++ b/src/commands/extrasGame.ts @@ -33,9 +33,8 @@ function invokeMethod(interpreter: Interpreter, visual: RuntimeObject, method: s export function visualState(interpreter: Interpreter, visual: RuntimeObject): VisualState { const image = invokeMethod(interpreter, visual, 'image') const position = interpreter.send('position', visual)! - const roundedPosition = interpreter.send('round', position)! - const x = roundedPosition.get('x')!.innerNumber! - const y = roundedPosition.get('y')!.innerNumber! + const x = round(position.get('x')!.innerNumber!) + const y = round(position.get('y')!.innerNumber!) const message = visual.get('message')?.innerString return { image, position: { x, y }, message } }