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

Making use of the new board classes to simplify flows #27

Merged
merged 8 commits into from
Jul 17, 2019

Conversation

xavierlepretre
Copy link
Collaborator

No description provided.

@xavierlepretre xavierlepretre marked this pull request as ready for review July 17, 2019 11:31
@xavierlepretre
Copy link
Collaborator Author

@rogersanick I reckon we could merge this now.

else leftEq.cornerIndex.value - rightEq.cornerIndex.value
}
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abellagonzalo Have a look at the functions above. They should help you traverse the graph in search of the longest road.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good. I like the idea of the corner and side comparators.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@abellagonzalo If you find yourself manipulating sides and corners other than traversing and keeping tabs on them, let me know, so I can help devise yet another function.
Also, make a small pull request with a minor change so that you make sure that process is working for you.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was my first commit 404727b

@xavierlepretre
Copy link
Collaborator Author

I will split the GameBoardState.kt file into smaller chunks after this merge.

Copy link
Owner

@rogersanick rogersanick left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @xavierlepretre - this looks good to me. Have you been able to run the tests with these updates? Let me know when this is good to merge.

@xavierlepretre
Copy link
Collaborator Author

I have 2 failed tests.

java.lang.AssertionError: You should be using the end turn function. Expected an exception of class net.corda.core.flows.FlowException to be thrown, but was java.lang.IllegalArgumentException: You cannot build a new road on top of a current one

Which is thrown by a require in a class in game board. I could not pinpoint where the road is attempted to be overwritten.

The other is because of a assert(false)...

@xavierlepretre
Copy link
Collaborator Author

Otherwise good to merge.

@rogersanick rogersanick merged commit 055488c into rogersanick:master Jul 17, 2019
@xavierlepretre xavierlepretre deleted the xl-use-board-classes branch July 17, 2019 20:17
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.

3 participants