Added tie and victory conditions