Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function * getMove (...moves) {
- if (moves.length === 9) yield moves
- if (moves.length < 9)
- for (let x = 0, X = 9; x < X; x++)
- if (moves.length < 9 && !moves.includes(x))
- yield* getMove(...moves, x)
- }
Add Comment
Please, Sign In to add comment