DEV Community

Discussion on: A Naive Knight's Tour

Collapse
 
cherfa11209 profile image
Sherif Cherfa

return (newX >= 0 && newX < boardSize && newY >= 0 && newY < boardSize && board[newX][newY] = false)
One line function to check cell availability. Thanks for the solution template!