public virtual void SetUp() { Basis.ConnectIDGenerator(); Engine.Cosmogenesis("bang", __factory); _gameState = new GameState { Map = new CompoundMap { BeingMap = new BeingMap(), RotMap = new RotMap(), SpaceMap = CreateSmallTestMap(), ItemMap = new ItemMap(), }, }; _inQ = new Queue <AsciiKey>(); __messager.GetNextKeyPress() .Returns((ci) => _inQ.Count > 0 ? _inQ.Dequeue() : new AsciiKey { Key = Keys.None }); __messager.IsInputReady() .Returns((ci) => _inQ.Count > 0); _strategy = new BeingStrategy_UserInput(_gameState); SourceMe.InjectProperties(_strategy); __being = Substitute.For <IBeing>(); __being.IsPlayer = true; }
public virtual void TearDown() { _inQ = null; _strategy = null; __being = null; }