Skip to content

Instantly share code, notes, and snippets.

@mohsenheydari
Last active January 8, 2019 01:10
Show Gist options
  • Save mohsenheydari/8a6f17e25a5b4fa0f61f18ef39edd7a8 to your computer and use it in GitHub Desktop.
Save mohsenheydari/8a6f17e25a5b4fa0f61f18ef39edd7a8 to your computer and use it in GitHub Desktop.
Tic Tac Toe GmaeBoardRenderer class structure
class GmaeBoardRenderer{
constructor(canvas, canvasSize){
...
}
render(boardState){
...
}
drawCells(boardState){
...
}
drawX(x, y){
...
}
drawO(x, y){
...
}
drawGrid(){
...
}
clear(){
...
}
getCellIndex(position){
...
}
getRelativeCursorPosition(event){
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment