Revision 5bf99b7...

Go back to digest for 5th January 2014

Features in Games

Jaime Torres Amate committed changes in [knavalbattle] /:

Show not shunk ships when the game finishes

This patch includes the work done by Roney in the show-ships branch
but I still do not know how to merge out of date branches.
My work is only the two phase end of game of the network part.

How does it accomplishes its purpose?
* The end game has now two phases, first send/receive the ships in the
GameOverMessage, then the end game part.
* All the entities include a reference to the SeaView to be able to show
the ships (included in the parent class Entity)
* The shoots are drawn over the ships
* Instead of a parameter, the flag of adjacent ships is now a member
(grabbed from the multiple ships patch).
* The ships have now the coordinates where they are.
* The GameOverMessage was already ready to send/receive ships
(with a little bug off_by_1 fixed).
* Changed the name of a variable from a confusing name m_sea to a more
clear m_seaview
* There are now two lists of ships (for both entities to be able to
interchange the ships)

* It does not include configuration for this functionality, I think
everybody expects this behavior from this kind of game.

FIXED-IN: 4.12
REVIEW: 114620

File Changes

Modified 28 files
  •   src/aientity.cpp
  •   src/aientity.h
  •   src/battlefield.cpp
  •   src/battlefield.h
  •   src/battlefieldview.cpp
  •   src/battlefieldview.h
  •   src/controller.cpp
  •   src/controller.h
  •   src/coord.h
  •   src/entity.cpp
  •   src/entity.h
  •   src/networkentity.cpp
  •   src/networkentity.h
  •   src/playerentity.cpp
  •   src/playfield.cpp
  •   src/playfield.h
  •   src/protocol.cpp
  •   src/sea.cpp
  •   src/sea.h
  •   src/seaview.cpp
  •   src/seaview.h
  •   src/ship.cpp
  •   src/ship.h
  •   src/simplemenu.cpp
  •   src/uientity.cpp
  •   src/uientity.h
  •   src/ai/dummyai.cpp
  •   src/ai/smartai.cpp
28 files changed in total