コード例 #1
0
 public SnakeActivity()
 {
     _paints        = new Dictionary <PositionState, Paint>();
     _snakeService  = new SnakeService(SIZE, SIZE);
     _cloudService  = new EventHubService();
     _advanceAction = Advance;
 }
コード例 #2
0
 public SnakeController(IHubContext <GameHub> hubContext,
                        UserManagement userManagement,
                        SnakeService snakeService)
 {
     _hubContext     = hubContext;
     _snakeService   = snakeService;
     _userManagement = userManagement;
 }
コード例 #3
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);



            var view = new DevExprForm();

            var service         = new SnakeService();
            var appSettingsPath = System.IO.Path.Combine(Application.CommonAppDataPath, "app.config");
            var settings        = Serializer.DeserializeObject <Settings>(appSettingsPath);

            var presenter = new SnakePresenter(view, service, settings);


            Application.Run(view);

            Serializer.SerializeObject(appSettingsPath, Settings.Instance);
        }