Added win condition logic to the view.