I am practicing object oriented design and have taken Tic Tac Toe as an example. I have written first all the requirements and then started writing code. I would like to get it reviewed so that I can improve my skill further. Please provide suggestions.I have placed code at this GitHub repo.Square.js//Square classfunction Square(){    this.symbol = ;    this.isOccupied = false;}//Based on player turn set symbolsSquare.prototype.setSymbol = function(value){    if(value !== 'X' && value !== 'O'){        return 'Please enter X or O';    }else if(this.isOccupied){        return 'This square is already filler'    }else{        this.symbol = value;        this.isOccupied = true;    }};Square.prototype.getSymbol = function(){    return this.symbol;};Board.js//Board Classfunction Board(sqaures){    this.squares = sqaures;    this.grid = [];    this.filledSquare = 0;}//Builds board based on number of squaresBoard.prototype.buildBoard = function(){    var i,j;    for(i = 0; i < this.squares; i++){        this.grid[i] = [];        for(j = 0; j < this.squares; j++){            this.grid[i][j] = new Square();        }    }};//Updates board on each players turnBoard.prototype.update = function(row, column, symbol){    this.grid[row][column].setSymbol(symbol);    this.filledSquare++;};//Show the current state of boardBoard.prototype.displayBoard = function(){    var i, j,brd = ;    for(i = 0; i < this.squares; i++){        for(j = 0; j < this.squares; j++){            brd += this.grid[i][j].getSymbol() +' - ';        }        brd += '\n';    }    console.log(brd);};Player.js//Player Classfunction Player(name,symbol){    this.name = name;    this.symbol = symbol;}tttgame.js//The game class which governs the playfunction TTTGame(squares){    this.board = new Board(squares);    this.board.buildBoard();    this.players = [];    this.players[0] = new Player('John','X');    this.players[1] = new Player('Doe', 'O');    this.getCurrentPlayer = function(){        return (this.board.filledSquare %2 === 0 ? 'X' : 'O');    };    //I have written this as dummy method which should be replaced with actual logic    this.play = function(){        this.board.displayBoard();        var currentPlayer = this.getCurrentPlayer();        var row, col, symbol;        this.board.update(0,1,currentPlayer);        currentPlayer = this.getCurrentPlayer();        this.board.update(0,0,currentPlayer);        currentPlayer = this.getCurrentPlayer();        this.board.update(1,1,currentPlayer);        currentPlayer = this.getCurrentPlayer();        this.board.update(2,1,currentPlayer);        currentPlayer = this.getCurrentPlayer();        this.board.update(1,0,currentPlayer);        this.board.displayBoard();    }    //It will contain method to decide winner or tie}GameStarter.js//Starts the game(function GameStarter(){    var tttGame = new TTTGame(3);    tttGame.play();})();
OO design for Tic Tac Toe program
javascript;object oriented;design patterns;tic tac toe