Implemented checkVictoryCondition of the Board class.