module export
This commit is contained in:
+1
-10
@@ -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 }
|
||||||
Reference in New Issue
Block a user