Follow-up Comment #1, patch #1610 (project wesnoth):
Some stylistical issues first. Sentences in comments should start with an
uppercase letter and end with a point. Comments should also have a duplicated
star at start so that they appear in the online documentation. Don't return a
std::string in choice_string, char const * is way sufficient. The code in
unit.cpp is a bit ugly; since you are already in this file, you may just as
well put the functions in the unit class.
Now concerning the code. I'm not convinced by the logic behind
classify_interactive_choice. For instance, for a noncurrent side with an
empty replay, shouldn't we break hard (e.g. throw an exception) rather than
returning remote_master? By the way, we should also break hard for the
preload case in game_has_started.
As for handling text rather than only integers, it may just be a matter ofs
upgrading your choice functions so that they directly deal with generic
config objects rather than specific integers.
_______________________________________________________
Reply to this item at:
<http://gna.org/patch/?1610>
_______________________________________________
Message posté via/par Gna!
http://gna.org/
_______________________________________________
Wesnoth-bugs mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-bugs