Fix bug with height and width of the board size
checking for matches