Skip to content

Implement short circuit check for player1 win - #1607

Open
RoryLGroom wants to merge 1 commit into
TheAlgorithms:masterfrom
RoryLGroom:tic-tac-toe-short_circuit
Open

RoryLGroom wants to merge 1 commit into
TheAlgorithms:masterfrom
RoryLGroom:tic-tac-toe-short_circuit

Conversation

@RoryLGroom

Copy link
Copy Markdown

Description of Change

Add checkwin() after player places 'x' in Tic Tac Toe. Avoids edge case of player 2 placing after player one has a winning combination, but player 2's choices are checked first, resulting in player 2 winning.

References

Checklist

  • [x ] Added description of change
  • [x ] PR title follows semantic commit guidelines
  • [x ] I acknowledge that all my contributions will be made under the project's license.

Notes:
Short circuit player 1 win in tic tac toe.

Add win check after player places 'x' in Tic Tac Toe. Avoids edge case of player 2 placing after player one has a winning combination, but player 2's choices are selected first.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant