История изменений
Исправление x3al, (текущая версия) :
the movement routine would return a list of any of these side effects:
All of a sudden things are a lot simpler. You can pass in the relevant parts of the state of the world, and get back a simple list detailing what happened. Actually handling what happened is a separate step, one that can be done later on in the frame. The advantage here is that changes to core world data don't have to be painstakingly threaded in and out of all functions in the game.{new_position, Coordinates} {ate_ghost, GhostName} {ate_dot, Coordinates} ate_fruit killed_by_ghost
Ⓒ оно же, http://prog21.dadgum.com/26.html (начало — http://prog21.dadgum.com/23.html)
Исходная версия x3al, :
the movement routine would return a list of any of these side effects: {new_position, Coordinates} {ate_ghost, GhostName} {ate_dot, Coordinates} ate_fruit killed_by_ghost All of a sudden things are a lot simpler. You can pass in the relevant parts of the state of the world, and get back a simple list detailing what happened. Actually handling what happened is a separate step, one that can be done later on in the frame. The advantage here is that changes to core world data don't have to be painstakingly threaded in and out of all functions in the game.
Ⓒ оно же, http://prog21.dadgum.com/26.html (начало — http://prog21.dadgum.com/23.html)