public SnakeActivity() { _paints = new Dictionary <PositionState, Paint>(); _snakeService = new SnakeService(SIZE, SIZE); _cloudService = new EventHubService(); _advanceAction = Advance; }
public SnakeController(IHubContext <GameHub> hubContext, UserManagement userManagement, SnakeService snakeService) { _hubContext = hubContext; _snakeService = snakeService; _userManagement = userManagement; }
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); }