currently, the ship to be placed are hidden when they can not be placed in the current position. I think it will be better to show the ship, but with some kind of forbidden signal, or another color... Also to have some text (or icons) in the status line showing the remaining ships to place. Reproducible: Always
Git commit a80288ebf8759e0a74b3dd7b5f3c50114b340a4b by Roney Gomes. Committed on 14/01/2014 at 01:15. Pushed by roneygomes into branch 'master'. Do not hide ships when they cannot be placed. Some methods in the Delegate classes were too much procedural to my like. I don't see with good eyes a method that should return a bool returning a pointer instead. To get rid of this, Delegate::canAddShip() now returns bool and when we need to get a pointer to the next ship to be placed, nextShip() -- which became public -- does its job. This is not everything, the coolest part of this commit is that now sprites will turn red when a ship can't be placed and green when this is not the case. Just like some RTS games do. :-) Just between us, having no sprites at all wasn't very user friendly. FIXED-IN: 4.13.1 GUI: DIGEST: M +32 -20 src/battlefieldview.cpp M +5 -1 src/battlefieldview.h M +2 -1 src/delegate.h M +9 -9 src/playerentity.cpp M +2 -2 src/playerentity.h M +3 -8 src/seaview.cpp M +15 -0 src/sprite.cpp M +2 -0 src/sprite.h http://commits.kde.org/knavalbattle/a80288ebf8759e0a74b3dd7b5f3c50114b340a4b