Beispiel #1
0
 public void FromTableau(Tableau tableau)
 {
     Initialize();
     TableauInputOutput.FromTableau(tableau);
     Variation = Tableau.Variation;
     Algorithm.PrepareToPlay();
 }
Beispiel #2
0
 public void FromGame(Game other)
 {
     Initialize();
     TableauInputOutput.FromTableau(other.Tableau);
     Variation = Tableau.Variation;
     Algorithm.PrepareToPlay();
 }
Beispiel #3
0
 public void FromAsciiString(string s)
 {
     Initialize();
     TableauInputOutput.FromAsciiString(s);
     Variation = Tableau.Variation;
     Algorithm.PrepareToPlay();
 }
Beispiel #4
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;
        }
Beispiel #5
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;
        }
Beispiel #6
0
 public override string ToString()
 {
     return(TableauInputOutput.ToPrettyString());
 }
Beispiel #7
0
 public string ToPrettyString()
 {
     return(TableauInputOutput.ToPrettyString());
 }
Beispiel #8
0
 public string ToAsciiString()
 {
     return(TableauInputOutput.ToAsciiString());
 }