Modified constructor to accept an array reference containing the board width and height