checks for winner, dynamic board size