Exemplo n.º 1
0
        private void ShowGameModeOptions(string gameModeName)
        {
            ConfigurationInformationTitles.Text = "Can Checker Beat The Queen" + Environment.NewLine +
                                                  "Can The Queen Move Over More Fields" + Environment.NewLine +
                                                  //"Should Checker Make The Best Move First" + Environment.NewLine +
                                                  "Can Checker Make A Reverse Beat" + Environment.NewLine +
                                                  "Color For Top Left Corner" + Environment.NewLine +
                                                  "Board Size";
            GameConfiguration pickedGameModeConfiguration = new GameConfiguration(GameModeConfigurations, gameModeName);

            ConfigurationInformationValues.Text =
                pickedGameModeConfiguration.CanCheckerBeatQueen().ToString() + Environment.NewLine +
                pickedGameModeConfiguration.CanQueenMoveOverMoreFields().ToString() + Environment.NewLine +
                //pickedGameModeConfiguration.ShouldCheckerMakeTheBestMoveFirst().ToString() + Environment.NewLine +
                pickedGameModeConfiguration.CanCheckerMakeReverseBeat().ToString() + Environment.NewLine +
                pickedGameModeConfiguration.GetColorForTopLeftCorner().ToString() + Environment.NewLine +
                pickedGameModeConfiguration.GetBoardSize().ToString() + "x" + pickedGameModeConfiguration.GetBoardSize().ToString();
        }
Exemplo n.º 2
0
        private List <Point> GetPossibleMovesOverEnemies(Field field)
        {
            List <Point> possibleLocations = new List <Point> {
            };
            List <Point> enemies           = GetNearestEnemiest(field);

            if (!field.PlacedChecker.IsQueen && !GameConfiguration.CanCheckerBeatQueen())
            {
                enemies = RemoveQueens(enemies, field);
            }

            foreach (Point enemyPoint in enemies)
            {
                Field enemy = BoardFields[enemyPoint.X, enemyPoint.Y];
                possibleLocations.AddRange(GetPossibleMovesOverEnemy(enemy, field));
            }

            possibleLocations = LimitToBoard(possibleLocations);

            return(possibleLocations);
        }