[Kde-games-devel] Review Request 112676: refactor player selection

Alexander Schuch aschuch247 at gmail.com
Wed Oct 2 00:03:20 UTC 2013


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/112676/
-----------------------------------------------------------

(Updated Oct. 2, 2013, 12:03 a.m.)


Review request for KDE Games.


Changes
-------

I merged the attached file and (hopefully) replaced the diff against master. The player selection now automatically resizes the first column based on given player names, so that enough space should always be present for the type.

Right now the AI names are "weak", "normal" and "hard". I propose to change the AI names to "Default Weak", "Default Offensive" and "Default Defensive". The terms "normal" and "hard" suggest that it is easier to win against "normal" than it is against "hard". However, during development of Becai (other patch pending), I (it) had no problems regularly defeating "hard", but I (it) had issues regularly winning against "normal". This all depends on the used playing style, so "tactical names" like "Default Offensive" and "Default Defensive" are more appropriate.


Repository: konquest


Description
-------

The default AI is handled by players/ai/default/default.cpp. The difficulty is wrapped in own classes so that the external interface is the same for all players (AI and human).

Adding new AI players is as easy as to implement the code in an own class, add a GUI wrapper (see ai/example) and add the GUI wrapper to m_selectablePlayer in NewGameDlg constructor.


Diffs (updated)
-----

  CMakeLists.txt 0e8a354 
  dialogs/newgamedlg.h 10ce4ee 
  dialogs/newgamedlg.cc be764f1 
  players/ai/default/default.h PRE-CREATION 
  players/ai/default/default.cpp PRE-CREATION 
  players/ai/default/hard.h PRE-CREATION 
  players/ai/default/hard.cpp PRE-CREATION 
  players/ai/default/hard_gui.h PRE-CREATION 
  players/ai/default/hard_gui.cpp PRE-CREATION 
  players/ai/default/normal.h PRE-CREATION 
  players/ai/default/normal.cpp PRE-CREATION 
  players/ai/default/normal_gui.h PRE-CREATION 
  players/ai/default/normal_gui.cpp PRE-CREATION 
  players/ai/default/weak.h PRE-CREATION 
  players/ai/default/weak.cpp PRE-CREATION 
  players/ai/default/weak_gui.h PRE-CREATION 
  players/ai/default/weak_gui.cpp PRE-CREATION 
  players/ai/example/example.h PRE-CREATION 
  players/ai/example/example.cpp PRE-CREATION 
  players/ai/example/example_gui.h PRE-CREATION 
  players/ai/example/example_gui.cpp PRE-CREATION 
  players/computerplayer.h ec25217 
  players/computerplayer.cpp 2df7dd8 
  players/localplayer_gui.h PRE-CREATION 
  players/localplayer_gui.cpp PRE-CREATION 
  players/player.h be0133a 
  players/player_gui.h PRE-CREATION 
  players/player_gui.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/112676/diff/


Testing
-------


Thanks,

Alexander Schuch

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-games-devel/attachments/20131002/7f38cf46/attachment.html>


More information about the kde-games-devel mailing list