Timeline for Battleship Game in Java
Current License: CC BY-SA 4.0
8 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 19, 2019 at 14:05 | comment | added | Roman | @KorayTugay you can get the best from both worlds: A Ship can know its position, while the game engine from @TorbenPutkonen request Ships by their position and interact with them. | |
| Feb 19, 2019 at 13:56 | comment | added | Koray Tugay | @Roman I think you are right. I am myself confused as well honestly :) What I had in mind was what Torben is saying, but I guess you are right too. :) I am confused with my own code. | |
| Feb 19, 2019 at 13:49 | comment | added | TorbenPutkonen | I find that mind games regarding extensions sometimes help. E.g. what if I want to add a nuke that hits at a radius larger than one? Would adding that be easy? If not, the design is flawed. | |
| Feb 19, 2019 at 13:45 | comment | added | TorbenPutkonen | I would add to that that board should not contain algorithms to handle missile hits. Missile hits are part of the rules of the game so they should be in the game engine. How the game engine implements them is another issue (e.g. it can set up object relations so that a hit to board automatically triggers a hit at a certain location of a ship). | |
| Feb 19, 2019 at 13:44 | comment | added | Roman | But since the ship holds the shipGeographic (ship.shipGeographic) it knows where it is.. or am I wrong.. | |
| Feb 19, 2019 at 13:42 | comment | added | Koray Tugay | You can see @Torbens comment in the answer above as well, I actually saw it after I commented to your answer. He seems agree with me. | |
| Feb 19, 2019 at 13:41 | comment | added | Koray Tugay | A ship can not handle if it is shot or not, a board knows where the ship is. Thanks for the thoughts though, as usual +1. | |
| Feb 19, 2019 at 12:46 | history | answered | Roman | CC BY-SA 4.0 |