示例#1
0
        public void faireCopie(Plateau damierTest)
        {
            for (int i = 0; i < VX; i++)
            {
                for (int j = 0; j < VY; j++)
                {
                    damierTest.setCase(i, j, this.getCase(i, j));
                }

            }
        }
示例#2
0
        public Puissance4()
        {
            graphics = new GraphicsDeviceManager(this);
            Content.RootDirectory = "Content";

            damier = new Plateau();
            positionjaune = 3;
            touche_up = true;
            etat = 0;

            ordi = new IA(damier);
        }
示例#3
0
文件: IA.cs 项目: Lilian-Tacos/Csharp
        public int trouveColonne(bool joueur)
        {
            Plateau damierTest = new Plateau();
            damier.faireCopie(damierTest); // copie damier dans damierTest

            for (int colonne = 0; colonne < damierTest.getVY(); colonne++)
            {
                if(damierTest.jouer(colonne, joueur) == 2){
                    return colonne;
                }
                damier.faireCopie(damierTest);
            }
            return -1;
        }
示例#4
0
文件: IA.cs 项目: Lilian-Tacos/Csharp
 public IA(Plateau damier)
 {
     rnd = new Random();
     this.niveau = 1;
     this.damier = damier;
 }