From ef94d922448ff5f0cac8d6bd1e60e546e4bee6ed Mon Sep 17 00:00:00 2001 From: niliara-edu Date: Sun, 15 Dec 2024 14:30:06 +0100 Subject: allow placing when attacking --- src/engine/vector2.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/engine/vector2.js') diff --git a/src/engine/vector2.js b/src/engine/vector2.js index 8b10e28..0cf2217 100644 --- a/src/engine/vector2.js +++ b/src/engine/vector2.js @@ -4,17 +4,17 @@ export class Vector2 { this.y = y } - static sum(a, b) { + static sum(vector_a, vector_b) { return new Vector2( - a.x + b.x, - a.y + b.y, + vector_a.x + vector_b.x, + vector_a.y + vector_b.y, ) } - static equals(a, b) { + static equals(vector_a, vector_b) { if ( - a.x == b.x && - a.y == b.y + vector_a.x == vector_b.x && + vector_a.y == vector_b.y ) { return true } -- cgit v1.2.3