Guest User

Untitled

a guest
Oct 17th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function * getMove (...moves) {
  2. if (moves.length === 9) yield moves
  3. if (moves.length < 9)
  4. for (let x = 0, X = 9; x < X; x++)
  5. if (moves.length < 9 && !moves.includes(x))
  6. yield* getMove(...moves, x)
  7. }
Add Comment
Please, Sign In to add comment