Skip to content

Instantly share code, notes, and snippets.

@RahmatSaeedi
Created May 10, 2021 14:32
Show Gist options
  • Save RahmatSaeedi/a3fa9b9a0604e759a0df838c8955445d to your computer and use it in GitHub Desktop.
Save RahmatSaeedi/a3fa9b9a0604e759a0df838c8955445d to your computer and use it in GitHub Desktop.
CodeSignal - Arcade - Intro - JS - chessBoardCellColor
function chessBoardCellColor(cell1, cell2) {
return (cell1.charCodeAt(0) - cell2.charCodeAt(0) + cell1.charCodeAt(1) - cell2.charCodeAt(1)) %2 == 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment