Beispiel #1
0
        const bool ALLOW_UNLIMITED_ROLL_6 = true;  // 'false' not implemented

        // <ctors>

        // ctor (new game)
        internal Session(BoardInfo boardInfo, Rules rules)
        {
            IsLoadedFromSavegame = false;
            pieceDistances       = new int[boardInfo.SlotCount][];
            currentPieces        = new PieceInfo[PIECE_COUNT];
            BoardInfo            = boardInfo;
            Rules = rules;
        }
Beispiel #2
0
 // ctor (load game)
 internal Session(LudoSave save) // TODO: check that the save is valid?
 {
     IsLoadedFromSavegame = true;
     TurnCounter          = save.TurnCounter;
     pieceDistances       = save.pieceDistances.JaggedCopy();
     currentPieces        = new PieceInfo[PIECE_COUNT];
     BoardInfo            = new BoardInfo(save.BoardLength);
     Rules          = save.Rules;
     CurrentSlot    = save.CurrentSlot;
     CurrentDieRoll = save.CurrentDieRoll;
 }