-
Notifications
You must be signed in to change notification settings - Fork 10
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
It's possible to start the game without placing all the ships #8
Comments
This sounds like a very fun project, I would like to help you with your bug and maybe some of your enhancements. Can you assign this to me? |
@sstanham Hi! |
Thank you! I'm going through the code to get it running first. Just to make sure, where do I run the project from? I assume its the Application.java file? |
Exactly, that's the entry point of the program. Currently I'm working on integrating Maven, for an easier and IDE-independent approach, so the project structure will change if everything works correctly.😄 |
Hi, I'm trying to run the project from the Application.java file and I keep running into this error:
Is there a dependency that I may be missing, or something else I'm missing? My IDE is VScode, if that makes a difference. |
Yeah, I know about this problem, sorry about that. |
Will do, I'll give IntelliJ a shot and keep you updated. Thank you! |
Sorry for the additional questions, but I was wondering if there was a way to playtest a game in IntelliJ. I've gotten the project downloaded and set-up, I just wanted to see how the project currently comes together. |
Don't worry! Let me know if this is enough to start the project. P.S: |
Perfect, got it all up and running now. Thank you for the guide, I was unfamiliar with the IntelliJ environment. |
Wonderful! |
Hi @sstanham ! |
Ah yes, sorry for not updating you on my progress, school work has been picking up. I wish to keep on this issue and will work on it as soon as I can. I'll make sure to grab the most recent branch when I get back to work on it. |
I feel you 😅 Don't worry and take your time, I was just checking since we got reached by new people. |
My plan is to work on this tomorrow, but I have done plenty of investigating and I believe I know how to fix this. I'll keep you posted |
Good! |
I found a way to fix the bug, just let me download the most recent version of the code, I'll modify it and send a push with an explanation |
#34 Just sent the pull request. I wrote the reasoning there. In short, I added an extra check for a click position, to check if it's valid. That way, if you click an invalid place as the last placement, it won't count it. Let me know what you think! |
Good, thank you! |
Ah perfect, I completely forgot to look for the conventions. I'll conform my changes when I return to my computer and I'll resend the request asap |
Thank you for the help! |
Thank you! Its a very fun project, so I'll take a look at the other bugs in the issue list and see if I can fix those too |
I just closed the request and submitted an updated version. Please let me know if I got the formatting right, and thank you for being patient with me! Edit: Sorry for spamming the pull requests, the last one should be the best one. |
This push is to fix the error that a player can start the game without placing their last ship. This is done by clicking anywhere a ship cannot be placed. I fixed this by adding a check in line 217, checking if the mouseclick is a valid location, and only recording the action if it is valid. Closes #8
This bug is easily reproducible by placing all but one ship and the activating the MouseListener without placing the last one.
The culprit is the cose inside ShipPlanner line 159 :
if (comboBoxItemCount == 1) { buttonOk.setEnabled(true); }
The text was updated successfully, but these errors were encountered: