Revision a80288e...

Go back to digest for 19th January 2014

Bug Fixes in Games

Roney Gomes committed changes in [knavalbattle] /:

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:

File Changes

Modified 8 files
  •   src/battlefieldview.cpp
  •   src/battlefieldview.h
  •   src/delegate.h
  •   src/playerentity.cpp
  •   src/playerentity.h
  •   src/seaview.cpp
  •   src/sprite.cpp
  •   src/sprite.h
8 files changed in total