From aa8786c63c70a7356922867e759f26f28d81edf1 Mon Sep 17 00:00:00 2001 From: leobr Date: Thu, 24 Nov 2022 13:18:53 +0100 Subject: [PATCH] module export --- code/connect4-winner.js | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/code/connect4-winner.js b/code/connect4-winner.js index 7ce9d27..60a37de 100644 --- a/code/connect4-winner.js +++ b/code/connect4-winner.js @@ -1,12 +1,3 @@ -let testBoard = [ - [ '_', '_', '_', '_', '_', '_', '_' ], - [ '_', '_', '_', '_', '_', '_', '_' ], - [ '_', '_', '_', 'r', 'r', 'r', '' ], - [ '_', '_', '_', 'r', 'r', 'b', 'b' ], - [ '_', '_', 'r', 'b', 'r', '', 'b' ], - [ 'b', 'r', 'b', 'r', 'r', 'b', 'r' ] -] - let checkLine = function (color, board, y, x, length){ if (length === 4){ return true; @@ -73,4 +64,4 @@ let connect4Winner = function (color, board) { } -console.log(connect4Winner('r', testBoard)) \ No newline at end of file +module.exports = { connect4Winner } \ No newline at end of file