[Commits] [wesnoth/wesnoth] 78c42a: move game_events and lua kernel into class game_st...

GitHub noreply at github.com
Tue Dec 23 04:24:28 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 78c42acc4887b36b17e61bd943a4c20e42cee93f
      https://github.com/wesnoth/wesnoth/commit/78c42acc4887b36b17e61bd943a4c20e42cee93f
  Author: Chris Beck <render787 at gmail.com>
  Date:   2014-12-22 (Mon, 22 Dec 2014)

  Changed paths:
    M src/game_state.cpp
    M src/game_state.hpp
    M src/play_controller.cpp
    M src/play_controller.hpp
    M src/playsingle_controller.cpp
    M src/replay_controller.cpp
    M src/scripting/game_lua_kernel.cpp
    M src/scripting/game_lua_kernel.hpp

  Log Message:
  -----------
  move game_events and lua kernel into class game_state

After this commit,

- almost all data which is part of the game in the sense of being
synchronized / saved is in the game_state class
- still missing is the code / data related to determining whose
turn is next
- the game state needs to be bound to a play_controller, via its
init function. This is needed so that lua / game_events manager
callbacks can be evaluated, but future refactor should make it
unnecessary
- bug # 23071 should be fixed

TODO:
- allow the game state to manage whose turn it is, leave only UI
 details in play_controller
- expose the lua kernel via the filter_context interface, and
make filters use it instead of resources
- make a proper copy ctor for game state, and improve encapsulation





More information about the Commits mailing list