Пример #1
0
 public SearchAlgorithm(Game game)
     : base(game)
 {
     BasicMoveFinder = new BasicMoveFinder(game);
     SwapMoveFinder = new SwapMoveFinder(game);
     SearchMoveFinder = new SearchMoveFinder(game);
     ScoreCalculator = new ScoreCalculator(game);
 }
Пример #2
0
 public StudyAlgorithm(Game game)
     : base(game)
 {
     BasicMoveFinder = new BasicMoveFinder(game);
     SwapMoveFinder = new SwapMoveFinder(game);
     CompositeSinglePileMoveFinder = new CompositeSinglePileMoveFinder(game);
     ScoreCalculator = new ScoreCalculator(game);
 }
 public CompositeSinglePileMoveFinder(Game game)
     : base(game)
 {
     UncoveringMoves = new MoveList();
     OneRunPiles = new PileList();
     Used = new PileList();
     Roots = new PileList();
     WorkingTableau = new Tableau();
     HoldingStack = new HoldingStack();
     SupplementaryMoves = new MoveList();
     MoveStack = new FastList<Move>();
 }
Пример #4
0
 public SearchMoveFinder(Game game)
     : base(game)
 {
     UseDepthFirst = false;
     WorkingTableau = new Tableau();
     TranspositionTable = new HashSet<int>();
     MoveStack = new MoveList();
     Moves = new MoveList();
     MaxDepth = 20;
     MaxNodes = 10000;
     MoveAllocator = new ListAllocator<Move>(false);
     NodeAllocator = new ListAllocator<Node>(true);
 }
Пример #5
0
 public ScoreCalculator(Game game)
     : base(game)
 {
 }
Пример #6
0
 public Game(Game other, AlgorithmType algorithmType)
     : this()
 {
     AlgorithmType = algorithmType;
     FromGame(other);
 }
Пример #7
0
 public Game(Game other)
     : this()
 {
     FromGame(other);
 }
Пример #8
0
 public void FromGame(Game other)
 {
     Initialize();
     TableauInputOutput.FromTableau(other.Tableau);
     Variation = Tableau.Variation;
     Algorithm.PrepareToPlay();
 }
Пример #9
0
 public static void PrintSideBySide(Game game1, Game game2)
 {
     Utils.PrintSideBySide(game1.Tableau, game2.Tableau);
 }
Пример #10
0
 public static void Print(Game game)
 {
     if (game == null)
     {
         return;
     }
     Utils.ColorizeToConsole(game.ToString());
 }
Пример #11
0
 public static void Print(Game other)
 {
     Game.Print(other);
 }
Пример #12
0
 public SwapMoveFinder(Game game)
     : base(game)
 {
     CardMap = new CardMap();
     Used = new FastList<int>();
 }