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

Update GameBoard.java #39

Merged
merged 1 commit into from
Dec 8, 2020
Merged

Update GameBoard.java #39

merged 1 commit into from
Dec 8, 2020

Conversation

sstanham
Copy link

@sstanham sstanham commented Dec 8, 2020

Addressed the issue where the last successful hit wouldn't change to the correct color, turning orange instead of red. This was resolved by manually setting the color of the last position to red before displaying the message. In the original code, when someone got a correct hit, the tile would turn red. The problem stemmed from this code turning the tile red wouldn't occur when someone won due to the if-else structure of this part of the code. As such, manually setting the tile to red when displaying the victory screen resolves this issue.

Addressed the issue where the last successful hit wouldn't change to the correct color, turning orange instead of red. This was resolved by manually setting the color of the last position to red before displaying the message. In the original code, when someone got a correct hit, the tile would turn red. The problem stemmed from this code turning the tile red wouldn't occur when someone won due to the if-else structure of this part of the code. As such, manually setting the tile to red when displaying the victory screen resolves this issue.
@sstanham
Copy link
Author

sstanham commented Dec 8, 2020

Copied from my branch:

Addressed the issue (#32) where the last successful hit wouldn't change to the correct color, turning orange instead of red. This was resolved by manually setting the color of the last position to red before displaying the message. In the original code, when someone got a correct hit, the tile would turn red. The problem stemmed from this code turning the tile red wouldn't occur when someone won due to the if-else structure of this part of the code. As such, manually setting the tile to red when displaying the victory screen resolves this issue.

@Sokom141
Copy link
Owner

Sokom141 commented Dec 8, 2020

Good job! Thank you for another contribution 😃

@Sokom141 Sokom141 added the bug Something isn't working label Dec 8, 2020
@Sokom141 Sokom141 added this to the 1.0 milestone Dec 8, 2020
@Sokom141 Sokom141 linked an issue Dec 8, 2020 that may be closed by this pull request
@Sokom141 Sokom141 merged commit 74ece8d into Sokom141:develop Dec 8, 2020
@sstanham sstanham deleted the develop branch December 8, 2020 20:07
@sstanham sstanham restored the develop branch December 8, 2020 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The last successfull hit doesn't update the board color
2 participants