Merged
Conversation
…s of AI handlers.
…s hand every turn. Added a simple message event to track AI turns, it is a bit hack for now because of an issue and there is only one message so it won't refresh properly yet.
… hand based on a predefined card priority. Also, reverted the message box to use as once is really only once so it will not work.
…ng the best possible card. Not sure it is working as intended, but it does allow the ai player to play instruction and repeat cards.
…ction. Always plays the highest repeat on the biggest stack first, then plays biggest instruction.
…tart adding unit tests to confirm this properly, now that I think the class is not going to change in any big way except add functionality.
…rking as expected, without proper unit tests yet.
…very card type to the basic priority list.
…stCardAction class. They are working as expected with play testing.
…t work in the game and tested the algorithm elsewhere, but it is without formal unit tests yet.
…places if needed. Adjusted some documentation.
…the message box for AI turns so that it is mildly informative for now.
…differing personalities.
…eally relevant for some newer changes and need to be rewritten.
… action objects and both type and personality.
…e the option of adding new actionHandlers to an AiHanlder in the future, but the PlayBestCardAction is quite competetive so far. Adjusted the comparator for lowest stacks that accept variables as the getTop() calls needed to use type. Adjusted tests to work with this.
…d in actions to make messages easier.
strinsberg
commented
Jun 12, 2020
…not really need to be tested and worked differently on different machines.
…being instantiated twice?
…mplicated and uses dynamic programming, but it will give a much more consitent result and should not be a problem with running too long unless something very serious changes with our games group cards and how many stacks a player can get out during a game. Unit tests were re-written to test it better than before.
johnanvik
reviewed
Jun 15, 2020
johnanvik
reviewed
Jun 15, 2020
johnanvik
approved these changes
Jun 15, 2020
Collaborator
johnanvik
left a comment
There was a problem hiding this comment.
Very good. There is an incredible performance improvement in gameplay. We may want to consider putting a timer delay just so the player feels like the AI is actually considering its move!
Collaborator
Author
|
Yes I have just created a new branch to address the AI cards being playable and added a small timer to allow for their turn to be "taken" as before. It is now sleeping in only one place so it is also easy to adjust to a time we like. |
Collaborator
Author
|
I have also found a couple of small bugs since submitting that I have taken care of in other branches that I will submit pull requests for once this is merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #573
Overview of changes
Notes
Reviewer: @johnanvik