module export

This commit is contained in:
leobr 2022-11-24 13:18:53 +01:00
parent d1263e57e0
commit aa8786c63c
1 changed files with 1 additions and 10 deletions

View File

@ -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){ let checkLine = function (color, board, y, x, length){
if (length === 4){ if (length === 4){
return true; return true;
@ -73,4 +64,4 @@ let connect4Winner = function (color, board) {
} }
console.log(connect4Winner('r', testBoard)) module.exports = { connect4Winner }