Revision 832505

Go back to digest for 20th July 2008

Features in Games

Stefan Majewsky committed changes in /trunk/playground/games/palapeli/game:

Silently lay the foundations for pattern plugins with a complete redesign of the Pattern classes.
* The old base class Pattern is split into two parts: PatternConfiguration specifies handles the whole user interaction part (values which have to be entered by the user or are read from and written to savegames). (This class will later be the one that is created by KPluginFactory.) When enough information has been given, the PatternConfiguration object creates a Pattern object which actually does the work of splitting the image into pieces with neighbor relations.

* The Pattern and PatternConfiguration base classes offer full abstraction of the features offered by Palapeli core. For example, the new implementation of the rectangular pattern in pattern-rectangular.[cpp|h] does only depend on pattern.h and pattern-configuration.h.

IMPORTANT: The new code is not yet included in the build. Actually, this is more or less a brain dump of this evening's work. (That means I do not even know if it compiles, but I'm quite sure that the logic is correct.) To get it to work, I need to do a new "New game" dialog and modify the Manager class a bit.
Wow, I'm quite talkative today...

File Changes

Added 6 files
  • /trunk/playground/games/palapeli/game
  •   /pattern-configuration.cpp
  •   /pattern-configuration.h
  •   /pattern-rectangular.cpp
  •   /pattern-rectangular.h
  •   /pattern.cpp
  •   /pattern.h
Modified 4 files
  • /trunk/playground/games/palapeli/game
  •   /pattern-abstract.cpp
  •   /pattern-abstract.h
  •   /pattern-rect.cpp
  •   /pattern-rect.h
10 files changed in total