protected void SetGameInfo(FlatlandGameInfo gameInfo) { comboBoxGame.Active = 2; entryGameDescription.Text = gameInfo.GameDescription; if (gameInfo.Tiles.HasValue) { checkBoxFlatlandCustomBoardSize.Active = true; spinButtonFlatlandBoardSize.Value = gameInfo.Tiles.Value; } else { checkBoxFlatlandCustomBoardSize.Active = false; } GTKUtility.SetComboBoxValue(comboBoxFlatlandCollisionBehavior, gameInfo.CollisionBehavior); GTKUtility.SetComboBoxValue(comboBoxFlatlandGameType, gameInfo.GameType); flatlandTeamStore.Clear(); foreach (var team in gameInfo.Teams) { flatlandTeamStore.AppendValues(team.TeamIndex, team.ThemeName, team.Kind, team.MoveSeconds, team.WrappedMovement, team.ScoringSystem); } flatlandFixedTiles = new List <Point>(gameInfo.FixedTiles); }
protected void SetGameInfo(PixelGameInfo gameInfo) { comboBoxGame.Active = 1; entryGameDescription.Text = gameInfo.GameDescription; spinButtonPixelMaxSize.Value = gameInfo.MaxSize; GTKUtility.SetComboBoxValue(comboBoxPixelInitialState, gameInfo.InitialState); GTKUtility.SetComboBoxValue(comboBoxPixelPlayerSort, gameInfo.PlayerSort); pixelGrid.ClearPixels(); pixelGrid.SetPixels(gameInfo.FixedPixels); }