Generation

generate functionSun, 14 May 2023

implementar minimax en el juego el gato

/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package juego; import java.util.Scanner; /** * * @author jc_go */ public class Gato { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int jugador = 1; int posicion; int[][] tablero = new int[3][3]; boolean ganador = false; int jugadas = 0; for(int i = 0; i < 3; i++){ for(int j = 0; j < 3; j++){ tablero[i][j] = 0; } } while(!ganador && jugadas < 9){ System.out.println(""); System.out.println("Jugador: " + jugador); System.out.

Questions about programming?Chat with your personal AI assistant