Closed rayanyedaly closed 6 months ago
Looks good so far! I think the answer for question 1 is probably best to ask @nkosko21 since I'm not too familiar with how hits and misses are currently being displayed on the frontend. If there's already a workaround on the front end, then there shouldn't be a need to add additional gamestate info/backend logic. For question 2, based on the battleship rules document, I don't think our original design needs to handle repeat guesses, but this can be an extension that we add if we have time. Feel free to let me know what you all think.
OKsounds good, I'll wait to hear from @nkosko21 about the hits/misses.
Ok if the frontend handles the repeat guess, then no need to worry about it for applyMove().
As for the hits and misses, I'll continue writing tests for the current version of applyMove() I have and then once you submit your PR with the new version, I'll add tests for recording hits and misses.
Yup, sorry about that. Should be all set
Implemented the applyMove() function using existing code to check for wins. applyMove() does the following:
I also wrote a nearly complete test suite that I am hesitant to put in the PR until it's done. I need to write a couple more but I also have some questions regarding applying/validating moves that I'd like to clarify with the group:
Sorry, I hope that makes sense, just want to make sure I'm thinking of this correctly.