Esempio n. 1
0
 public GameNotStartedState(GameSettings settings, IGameInitializer gameInitializer, IIntelligenceContextFactory contextFactory, IInputOutput io)
 {
     _settings        = settings;
     _gameInitializer = gameInitializer;
     _contextFactory  = contextFactory;
     _io = io;
 }
Esempio n. 2
0
 public PongGame(IGameInitializer gameInitializer, IPlayerInitializer playerInitializer,
     IPlayerFactory playerFactory, IBallFactory ballFactory, IBallInitializer ballInitializer)
 {
     this.gameInitializer = gameInitializer;
     this.playerInitializer = playerInitializer;
     this.playerFactory = playerFactory;
     this.ballFactory = ballFactory;
     this.ballInitializer = ballInitializer;
     Running = true;
 }
Esempio n. 3
0
 public PongGame(IGameInitializer gameInitializer, IPlayerInitializer playerInitializer,
                 IPlayerFactory playerFactory, IBallFactory ballFactory, IBallInitializer ballInitializer)
 {
     this.gameInitializer   = gameInitializer;
     this.playerInitializer = playerInitializer;
     this.playerFactory     = playerFactory;
     this.ballFactory       = ballFactory;
     this.ballInitializer   = ballInitializer;
     Running = true;
 }
Esempio n. 4
0
        static void Main(string[] args)
        {
            _loger.Debug("Application loading...");
            System.AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionTrapper;
            var container = new UnityContainer();

            UnityMapping.RegisterElements(container);
            IInputOutput     io = container.Resolve <IInputOutput>(new ParameterOverride("path", _inputPath));
            IGameInitializer gameInitializer = container.Resolve <IGameInitializer>();

            gameInitializer.Initialize();
            _loger.Debug("Application loaded.");
        }
Esempio n. 5
0
        public XnaGame(IGameInitializer initializer)
        {
            Content.RootDirectory = "Content";

            Instance = this;

            Initializer = initializer;

            Initializer.Initialize();

            // コンストラクタ後にGraphicsDeviceが生成されるので、
            // GraphicsDeviceManagerはInitializeの前にコンストラクタで作ること
            graphics = new GraphicsDeviceManager(this);

            // 解像度等の設定もInitializeの前にやっておく
            InitializeGraphics();

            DebugSampleAccessor.CreateInstance(this);
        }
Esempio n. 6
0
 public TestGameHandler(IGameInitializer gameInitializer, ISerializer serializer)
 {
     this.gameInitializer = gameInitializer;
     this.serializer = serializer;
 }
Esempio n. 7
0
 public Board(IGameInitializer gameInitializer)
 {
     Pieces = gameInitializer.Initialize();
 }
Esempio n. 8
0
 public Application(IGameInitializer gameInitializer, IIntelligenceContextFactory aiContextFactory, IInputOutput io)
 {
     _gameInitializer  = gameInitializer;
     _aiContextFactory = aiContextFactory;
     _io = io;
 }
Esempio n. 9
0
 public Goodwill(IGameParameters config, IGameInitializer gameInitializer)
 {
     _config = config;
     _gameInitializer = gameInitializer;
 }
Esempio n. 10
0
    private void Start()
    {
        IGameInitializer gameInitializer = GetComponentInChildren <IGameInitializer>();

        gameInitializer?.Initialize();
    }
Esempio n. 11
0
 private static GameNotStartedState BuildGameNotStartedState(GameSettings settings = null, IGameInitializer gameInitializer = null, IIntelligenceContextFactory contextFactory = null, IInputOutput io = null)
 {
     settings = settings ?? new GameSettings {
         BoardSize       = 3,
         GamePlayerType  = GamePlayerType.HumanVsHuman,
         PlayerStartType = PlayerStartType.FirstPlayerFirst
     };
     gameInitializer = gameInitializer ?? new MockGameInitializer();
     contextFactory  = contextFactory ?? new MockIntelligenceContextFactory();
     io = io ?? new MockInputOutput();
     return(new GameNotStartedState(settings, gameInitializer, contextFactory, io));
 }
 public ShootingProcessorTests()
 {
     _gameInitializer   = new GameInitializer();
     _shootingProcessor = new ShootingProcessor();
     _random            = new Random();
 }
 public void Initialize()
 {
     this.gameInitializer = new GameInitializer();
     this.serializer = new JsonSerializer();
 }
Esempio n. 14
0
 private static bool GameInitializeMapper(ReceiverList<IGameInitializer, int> list, IGameInitializer receiver, int parameter)
 {
     return receiver.Initialize();
 }
Esempio n. 15
0
 public GameEngine(IGameInitializer gameInitializer)
 {
     this.GameInitializer = gameInitializer;
     GameBoard = new Board(gameInitializer);
 }
Esempio n. 16
0
 public ApplicationRunner()
 {
     _gameInitializer   = new GameInitializer();
     _shottingProcessor = new ShootingProcessor();
 }