Difference between revisions of "AI Refactoring2009Crab"

From The Battle for Wesnoth Wiki
m (NEXT:)
m
Line 1: Line 1:
 
=CURRENT:=
 
=CURRENT:=
 
 
  ai_interface.hpp
 
  ai_interface.hpp
 +
ai.cpp
 +
ai.hpp
 
  ai_manager.cpp
 
  ai_manager.cpp
 
  ai_manager.hpp
 
  ai_manager.hpp
 +
formula_ai.cpp
 +
formula_ai.hpp
  
Move location of info structure from ai_interface to ai_holder (inside ai_manager) (still settable through ai_interface constructor)
+
Remove team_num and master from info structure, fix the code to use side() and master() instead.
 
 
=NEXT:=
 
ai_interface.hpp
 
@deprecate get_info and add info() to ai_interface.
 
 
 
=NEXT:=
 
ai.cpp
 
ai_interface.hpp
 
Change ai_interface methods to use info() instead of direct access
 
  
 
=NEXT:=
 
=NEXT:=
Line 31: Line 25:
 
remove info parameter from ai constructor (it will still be gettable through .info(), even in constructor, for all is needed to get it is 'side' and static 'ai_manager' method)
 
remove info parameter from ai constructor (it will still be gettable through .info(), even in constructor, for all is needed to get it is 'side' and static 'ai_manager' method)
  
At the moment, still 1 copy of info per team.
 
  
 
=NEXT:=
 
=NEXT:=
 +
 
  ai_interface.hpp
 
  ai_interface.hpp
ai.cpp
 
ai.hpp
 
 
  ai_manager.cpp
 
  ai_manager.cpp
 
  ai_manager.hpp
 
  ai_manager.hpp
formula_ai.cpp
 
formula_ai.hpp
 
  
Remove team_num and master from info structure, fix the code to use side() and master() instead.
+
Move location of info structure from ai_interface to ai_manager.
 +
 
 +
=NEXT:=
 +
ai_interface.hpp
 +
@deprecate get_info and add info() to ai_interface.
 +
 
 +
=NEXT:=
 +
ai.cpp
 +
ai_interface.hpp
 +
Change ai_interface methods to use info() instead of direct access

Revision as of 22:18, 10 April 2009

CURRENT:

ai_interface.hpp
ai.cpp
ai.hpp
ai_manager.cpp
ai_manager.hpp
formula_ai.cpp
formula_ai.hpp

Remove team_num and master from info structure, fix the code to use side() and master() instead.

NEXT:

ai_interface.hpp
ai.cpp
ai.hpp
ai_manager.cpp
ai_manager.hpp
formula_ai.cpp
formula_ai.hpp

add 'int side' parameter to ai constructor. add public side() method to get it.

add 'bool master' parameter to ai constructor. add public @deprecated master() method to get it.

remove info parameter from ai constructor (it will still be gettable through .info(), even in constructor, for all is needed to get it is 'side' and static 'ai_manager' method)


NEXT:

ai_interface.hpp
ai_manager.cpp
ai_manager.hpp

Move location of info structure from ai_interface to ai_manager.

NEXT:

ai_interface.hpp

@deprecate get_info and add info() to ai_interface.

NEXT:

ai.cpp
ai_interface.hpp

Change ai_interface methods to use info() instead of direct access