summaryrefslogtreecommitdiff
path: root/public/make_move.js
diff options
context:
space:
mode:
authorIgrisBRC <[email protected]>2024-07-14 11:24:07 +0530
committerIgrisBRC <[email protected]>2024-07-14 11:24:07 +0530
commitc5de8054793b54567e778935986e16741bdacad0 (patch)
tree0ffc8efb0b24d97c8bfae5e688cc6f8f3555672a /public/make_move.js
parent0cb30eae51381c1452112c681548ddb2337590ae (diff)
refactored the project
Diffstat (limited to 'public/make_move.js')
-rw-r--r--public/make_move.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/public/make_move.js b/public/make_move.js
new file mode 100644
index 0000000..ec0956d
--- /dev/null
+++ b/public/make_move.js
@@ -0,0 +1,5 @@
+function make_move(board, y ,x, new_y, new_x) {
+ let temp = board[y][x]
+ board[y][x] = 0
+ board[new_y][new_x] = temp
+}