Example #1
0
        public Game()
        {
            Seed = -1;
            TraceStartFinish = false;
            TraceDeals = false;
            TraceMoves = false;
            ComplexMoves = false;
            Diagnostics = false;
            Instance = -1;

            Shuffled = new Pile();
            Tableau = new Tableau();

            Candidates = new MoveList();
            SupplementaryList = new MoveList();
            RunFinder = new RunFinder();
            FaceLists = new PileList[(int)Face.King + 2];
            for (int i = 0; i < FaceLists.Length; i++)
            {
                FaceLists[i] = new PileList();
            }
            Coefficients = null;

            TableauInputOutput = new TableauInputOutput(Tableau);
            MoveProcessor = new MoveProcessor(this);

            Variation = Variation.Spider4;
            AlgorithmType = AlgorithmType.Study;
        }
Example #2
0
        public static void PrintSideBySide(Tableau tableau1, Tableau tableau2)
        {
            string[] v1  = TableauInputOutput.ToPrettyString(tableau1).Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
            string[] v2  = TableauInputOutput.ToPrettyString(tableau2).Split(new string[] { Environment.NewLine }, StringSplitOptions.None);
            int      max = 0;

            for (int i = 0; i < v1.Length; i++)
            {
                max = Math.Max(max, v1[i].Length);
            }
            string text = "";

            for (int i = 0; i < v1.Length || i < v2.Length; i++)
            {
                string s1 = i < v1.Length ? v1[i] : "";
                string s2 = i < v2.Length ? v2[i] : "";
                text += s1.PadRight(max + 1) + s2 + Environment.NewLine;
            }
            Utils.ColorizeToConsole(text);
        }
Example #3
0
 public static void Print(Tableau tableau)
 {
     Utils.ColorizeToConsole(TableauInputOutput.ToPrettyString(tableau));
 }