示例#1
0
    //C'est la que la magie arrive ei: calculer les odds
    public void CestLaQueLaPoutineSePasse ()
    {     
        gameCamels = new AllCamels (initialCamels);
        gameCamels.ShortInfoCamel();
        if (isBugged)
            gameCamels.InfoCamel("GameCamel First");

        List<AllCamels> allPermutations = gameCamels.AllUnrollCamelsPermutation();
        foreach (var permu in allPermutations)
        {
            if(isBugged)
                permu.InfoCamel("Permuration de camels",permu.OrderedCamelsForDice);
            
			rankCounts = MoveWithAllDicesCombo (permu, rankCounts);
		}
       
		//rankCounts.InfoRankCount ();

        //WriteInfoInFile("Result",LogRankToInfo(initialCamels.InfoCamel(), DicesCombinationsPossible(initialCamels.GetUnrollCamelsCount())));
    }
示例#2
0
	AllRankCount MoveWithAllDicesCombo(AllCamels allCamels, AllRankCount ranks)
    {
		List<List<int>> dices = DicesCombinationsPossible(allCamels.GetUnrollCamelsCount());
        Dictionary<string, string> dicesAndRank = new Dictionary<string, string>();

        foreach (List<int> d in dices)
        { 
			AllCamels tempCamels = new AllCamels(allCamels);
            tempCamels.MoveCamels(d, ranks);           
			ranks.UpdateRankCount (tempCamels.SortCamelInOrderPos());

            dicesAndRank.Add(DicesToString(d), tempCamels.ShortInfoCamel());
        }

        logRank.Add(allCamels.OrderForDiceInfoCamel(), dicesAndRank);

        return ranks;
    }