public void NotifyChanged(ModelData data, Event e) { _playerPosition = data.PlayerPosition; _wallPositions = data.WallPositions; _paperPosition = data.PaperPosition; _data = data; Draw(); }
public void NotifyObserver(Event e) { foreach (IModelObserver o in _observers) { var data = new ModelData(GetPlayerPosition(), GetWallPositions(), (Room.PaperFound) ? new Point(-1, -1) : GetPaperPosition(), Player.NumLife, _pagesRemaining); o.NotifyChanged(data, e); } }
public void NotifyChanged(ModelData data, Event e) { Event = e; Draw(); }