Example #1
0
        private List <Pion> PredictionList; //Prediction initial de la machine

        /// <summary>
        /// Creeune prediction pour la machine
        /// </summary>
        public Prediction() //Constructeur
        {
            Random rand = new Random();

            PredictionList = new List <Pion>(); // Liste des pions constituant la prediction
            for (int i = 0; i < 4; i++)
            {
                Pion p = new Pion(rand.Next(0, 6));
                PredictionList.Add(p);
                //  Console.WriteLine(p.ColorPion); //DEBUG
            }
        }
Example #2
0
        /// <summary>
        /// Fonction d'affichage d'un seul pion en fonction de ca couleur
        /// </summary>
        /// <param name="P"></param>
        public void AffichageCouleur(Pion P)
        {
            if (P.ColorPion == Pion.Color.Blanc)
            {
                Console.ForegroundColor = ConsoleColor.White;
                Console.Write("█  ");
            }

            if (P.ColorPion == Pion.Color.Bleu)
            {
                Console.ForegroundColor = ConsoleColor.Blue;
                Console.Write("█  ");
            }

            if (P.ColorPion == Pion.Color.Noir)
            {
                Console.ForegroundColor = ConsoleColor.DarkGray;
                Console.Write("█  ");
            }

            if (P.ColorPion == Pion.Color.Jaune)
            {
                Console.ForegroundColor = ConsoleColor.Yellow;
                Console.Write("█  ");
            }

            if (P.ColorPion == Pion.Color.Rouge)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.Write("█  ");
            }

            if (P.ColorPion == Pion.Color.Vert)
            {
                Console.ForegroundColor = ConsoleColor.Green;
                Console.Write("█  ");
            }
        }