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(ui): highlight shapes that can currently be placed #55

Merged
merged 4 commits into from
Nov 27, 2020

Conversation

anarchuser
Copy link
Contributor

@anarchuser anarchuser commented Nov 9, 2020

No description provided.

@@ -198,6 +198,10 @@ class GameController : Controller() {
}
subscribe<HumanMoveRequest> { event ->
logger.debug("Human move request")

val moves = GameRuleLogic.getPossibleMoves(event.gameState)
logger.debug("total: ${moves.size}")
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove the debug output or make the message more verbose so that it will be useful in the future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah, yeah, my bad.
I used to print the whole list before, but removed that because it was too noisy.
I'll update it; it's useful for debugging

@@ -198,6 +198,10 @@ class GameController : Controller() {
}
subscribe<HumanMoveRequest> { event ->
logger.debug("Human move request")

val moves = GameRuleLogic.getPossibleMoves(event.gameState)
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we reduce that to a set of possible shapes here, so that the check below doesn't have to go through all moves for every shape?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yeah, I did that meanwhile.
Still, had to wait for the other PR

Copy link
Contributor

@SKoschnicke SKoschnicke left a comment

Choose a reason for hiding this comment

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

I think the backend submodule should point to a commit where the new algorithm is used already, right?

@anarchuser
Copy link
Contributor Author

yes, exactly, after the other one is merged.
I'll also update this one then a bit based on some other changes

@anarchuser
Copy link
Contributor Author

This doesn't work properly yet due to a bug.
After software-challenge/backend#334 is merged, this PR is ready for review again

@anarchuser anarchuser marked this pull request as ready for review November 27, 2020 09:40
Copy link
Contributor

@SKoschnicke SKoschnicke left a comment

Choose a reason for hiding this comment

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

Awesome!

@anarchuser anarchuser merged commit 3f2d3a0 into master Nov 27, 2020
@anarchuser anarchuser deleted the feat/highlight-fitting-pieces branch November 27, 2020 10:33
@anarchuser anarchuser linked an issue Dec 15, 2020 that may be closed by this pull request
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.

Remove shapes that can't be played from local view
2 participants