Skip to content

Conversation

ashvin-parmar
Copy link

@ashvin-parmar ashvin-parmar commented Sep 7, 2024

…e by one

problem

Previously/Problem : There are 2 player playing but tic_tac_toe game but preferences for choice filling for 'o' and 'x' are filled at same time, which cause a bug in which same 'x' value are filled 2 times.
Which need to be improved and also at one time only one player can fill thier choice, that why i resolve this problem.

solution

Solution: I used conditional statement in which value of 'x' which are used for first player choice applied when (instance_for_loop%2==0) or else part for other player. on each round thier is checking for any player for win the match or draw and in a manner such that once player data is not assigned to other one.

Description of Change

References

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:
Both player are filling choice at different time one by one

Copy link
Contributor

github-actions bot commented Nov 6, 2024

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the Stale label Nov 6, 2024
Copy link
Contributor

Please ping one of the maintainers once you commit the changes requested or make improvements on the code. If this is not the case and you need some help, feel free to ask for help in our Gitter channel or our Discord server. Thank you for your contributions!

@github-actions github-actions bot closed this Nov 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant