コード例 #1
0
        private static int GetTypeOfPlayer(IDice dice)
        {
            string type = dice.GetType().ToString();

            switch (type)
            {
            case "GameEngine.Dice.AIDice": return(0);

            case "GameEngine.Dice.ConsoleDice": return(1);

            default: throw new NotImplementedException("Dice type not implemented in save function.");
            }
        }