Skip to content

Instantly share code, notes, and snippets.

View andreiskandar's full-sized avatar
🎯
Focusing

Andre Iskandar andreiskandar

🎯
Focusing
View GitHub Profile
/*
A game of chess is played on an 8 column by 8 row board.
In the game of chess, a queen can attack pieces which are on the same row, column, or diagonal.
*/
const generateBoard = (whiteQueen, blackQueen) =>{
let board = [];
let hzl = [];
for(let i = 0; i < 8; i++){
for(let j = 0; j < 8; j++){