Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add sequence strategy #40

Merged
merged 1 commit into from
Aug 20, 2023
Merged

feat: add sequence strategy #40

merged 1 commit into from
Aug 20, 2023

Conversation

AndrewADev
Copy link
Owner

@AndrewADev AndrewADev commented Aug 20, 2023

Add a play strategy that iterates through a pre-defined sequence of plays, looping infinitely from the beginning once the sequence is exhausted.

It is available via command line option, though for now just uses the default sequence when specified via command line.

$ python ./rps-sim.py --p1-strategy 'sequence'
Result: Player 1 wins
Result: Player 1 loses
Result: Player 1 wins
Simulation finished.
$ python ./rps-sim.py --p1-strategy 'sequence' --p2-strategy 'sequence'
Result: Player 1 draws
Result: Player 1 draws
Result: Player 1 draws
Simulation finished.

(since both players use the same sequence, the outcome is always a draw in the second example)

Add a play strategy that iterates through a pre-defined sequence of plays.

It is available via command line option, though for now just uses the default sequence when specified via command line.
@AndrewADev AndrewADev merged commit 09d82d3 into main Aug 20, 2023
1 check passed
@AndrewADev AndrewADev deleted the feat/sequence-strategy branch August 20, 2023 16:36
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.

None yet

1 participant