Summary: | do not hide the ships when they can not be placed under the current position | ||
---|---|---|---|
Product: | [Applications] knavalbattle | Reporter: | Jaime Torres <jtamate> |
Component: | general | Assignee: | Roney Gomes <roney477> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | CC: | kde-games-bugs, roney477, walch.martin |
Priority: | NOR | ||
Version: | 2.0 | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/knavalbattle/a80288ebf8759e0a74b3dd7b5f3c50114b340a4b | Version Fixed In: | 4.13.0 |
Sentry Crash Report: |
Description
Jaime Torres
2012-10-11 07:41:17 UTC
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 |