コード例 #1
0
ファイル: Program.cs プロジェクト: uhhernadez/IA_2000B
        static void Main(string[] args)
        {
            TableroGato tablero = new TableroGato();

            tablero.Mostrar();
            JugarRecursivamente(ref tablero);
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: uhhernadez/IA_2000B
        static public void JugarRecursivamente(ref TableroGato tablero)
        {
            Movimiento [] movimientos = tablero.CalcularMovimientos();

            if (movimientos == null)
            {
                //Console.WriteLine("El juego se terminó");
                return;
            }

            for (int k = 0; k < movimientos.Length; k++)
            {
                TableroGato siguiente = new TableroGato(tablero);
                siguiente.Mover(movimientos[k]);
                JugarRecursivamente(ref siguiente);
            }

            return;
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: uhhernadez/IA_2000B
 public TableroGato(TableroGato tableroGato)
 {
     tablero = new char[9];
     tableroGato.tablero.CopyTo(tablero, 0);
 }