Created
March 4, 2018 23:09
-
-
Save goldensunliu/af6568d3687b4004b738a0c153ee29eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Game extends Compoent { | |
... | |
eraseSelected = () => { | |
const selectedCell = this.getSelectedCell(); | |
if (!selectedCell) return; | |
this.fillNumber(false); | |
} | |
fillSelectedWithSolution = () => { | |
const { board, solution } = this.state; | |
const selectedCell = this.getSelectedCell(); | |
if (!selectedCell) return; | |
const { x, y } = board.get('selected'); | |
this.fillNumber(solution[x][y]); | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment