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; }
// 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; }