module export
This commit is contained in:
parent
d1263e57e0
commit
aa8786c63c
|
@ -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))
|
||||
module.exports = { connect4Winner }
|
Loading…
Reference in New Issue