import java.util.Random;
import java.util.Scanner;
import java.util.ArrayList;
import java.util.HashMap;
public class FutbolManager {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
Random random = new Random();
// ============================================================
// COLORES
// ============================================================
final String ROJO = "\u001B[31m";
final String VERDE = "\u001B[32m";
final String AMARILLO = "\u001B[33m";
final String AZUL = "\u001B[34m";
final String CYAN = "\u001B[36m";
final String RESET = "\u001B[0m";
// ============================================================
// CREAR EQUIPO
// ============================================================
System.out.print("🏟️ Crea tu club: ");
String nombreEquipo = scanner.nextLine();
long dinero = 20;
int partidosJugados = 0, ganados = 0, perdidos = 0, empatados = 0;
int contadorOfertas = 0;
// ============================================================
// PLANTILLA INICIAL (2-3 ESTRELLAS)
// ============================================================
ArrayList<String> miPlantilla = new ArrayList<String>();
miPlantilla.add("🧤 Portero: Álvaro Valles (Las Palmas) ⭐⭐");
miPlantilla.add("🛡️ Defensa: Reinier (Flamengo) ⭐⭐");
miPlantilla.add("🛡️ Defensa: Mario Hermoso (Atlético Madrid) ⭐⭐⭐");
miPlantilla.add("🛡️ Defensa: Pau Cubarsí (Barcelona) ⭐⭐");
miPlantilla.add("🛡️ Defensa: Alejandro Balde (Barcelona) ⭐⭐⭐");
miPlantilla.add("⚽ Mediocampista: André Gomes (Lille) ⭐⭐⭐");
miPlantilla.add("⚽ Mediocampista: Sergi Roberto (Barcelona) ⭐⭐");
miPlantilla.add("⚽ Mediocampista: Fermín López (Barcelona) ⭐⭐⭐");
miPlantilla.add("⚽ Delantero: Vitor Roque (Agente libre) ⭐⭐⭐");
miPlantilla.add("⚽ Delantero: Endrick (Real Madrid) ⭐⭐⭐");
miPlantilla.add("⚽ Delantero: Randal Kolo Muani (PSG) ⭐⭐⭐");
// ============================================================
// ESTADÍSTICAS DE JUGADORES (HashMap)
// ============================================================
HashMap<String, Integer> golesJugadores = new HashMap<String, Integer>();
HashMap<String, Integer> asistenciasJugadores = new HashMap<String, Integer>();
HashMap<String, Integer> porteriasCero = new HashMap<String, Integer>();
for (String jugador : miPlantilla) {
golesJugadores.put(jugador, 0);
asistenciasJugadores.put(jugador, 0);
porteriasCero.put(jugador, 0);
}
// ============================================================
// CANTERA
// ============================================================
String[][] cantera = {
{"Brayan", "17", "Delantero", "60", "⭐ Promesa cubana"},
{"Luis", "16", "Mediocampista", "55", "⭐ Talento natural"},
{"Carlos", "18", "Defensa", "58", "⭐ Fuerte y rápido"},
{"Javier", "17", "Portero", "50", "⭐ Buena estirada"},
{"Andrés", "15", "Delantero", "45", "⭐ Futuro crack"}
};
// ============================================================
// SUPLENTES
// ============================================================
ArrayList<String> suplentes = new ArrayList<String>();
suplentes.add("🧤 Portero: Mamardashvili (Valencia) ⭐⭐⭐");
suplentes.add("🛡️ Defensa: Mario Fernández (Cantera) ⭐⭐");
suplentes.add("⚽ Mediocampista: Sergio Díaz (Cantera) ⭐⭐");
suplentes.add("⚽ Delantero: Diego Mora (Cantera) ⭐⭐");
suplentes.add("⚽ Delantero: Javier Ortiz (Cantera) ⭐⭐");
// ============================================================
// 7 LIGAS (1ª DIVISIÓN) - 30 EQUIPOS
// ============================================================
String[][] ligas = {
// Premier League
{"Arsenal", "Aston Villa", "Bournemouth", "Brentford", "Brighton", "Chelsea", "Crystal Palace", "Everton", "Fulham", "Ipswich Town", "Leicester City", "Leeds United", "Liverpool", "Manchester City", "Manchester United", "Newcastle United", "Nottingham Forest", "Southampton", "Tottenham", "West Ham", "Wolverhampton", "Sunderland", "Middlesbrough", "West Brom", "Stoke City", "QPR", "Blackburn", "Charlton", "Sheffield United", "Derby County"},
// LaLiga
{"Alavés", "Athletic Club", "Atlético Madrid", "Barcelona", "Betis", "Celta", "Espanyol", "Getafe", "Girona", "Granada", "Las Palmas", "Leganés", "Levante", "Mallorca", "Osasuna", "Rayo Vallecano", "Real Madrid", "Real Sociedad", "Sevilla", "Sporting", "Valencia", "Valladolid", "Villarreal", "Zaragoza", "Racing Santander", "Recreativo", "Numancia", "Albacete", "Cádiz", "Tenerife"},
// Serie A
{"Atalanta", "Bologna", "Cagliari", "Como", "Empoli", "Fiorentina", "Genoa", "Hellas Verona", "Inter Milan", "Juventus", "Lazio", "Lecce", "AC Milan", "Monza", "Napoli", "Parma", "Roma", "Salernitana", "Sampdoria", "Sassuolo", "Spezia", "Torino", "Udinese", "Venezia", "Cremonese", "Frosinone", "Reggina", "Palermo", "Modena", "Bari"},
// Bundesliga
{"Augsburg", "Bayer Leverkusen", "Bayern Munich", "Borussia Dortmund", "Borussia Mönchengladbach", "Darmstadt", "Eintracht Frankfurt", "Freiburg", "Hoffenheim", "Köln", "Mainz", "RB Leipzig", "Stuttgart", "Union Berlin", "Wolfsburg", "Bochum", "Duisburg", "Hamburger SV", "Hannover", "Kaiserslautern", "Karlsruhe", "Nürnberg", "Schalke 04", "Werder Bremen", "Fortuna Düsseldorf", "St. Pauli", "Paderborn", "Jahn Regensburg", "Sandhausen", "Ingolstadt"},
// Ligue 1
{"Angers", "Auxerre", "Brest", "Clermont", "Lens", "Lille", "Lorient", "Lyon", "Marseille", "Metz", "Monaco", "Montpellier", "Nantes", "Nice", "PSG", "Reims", "Rennes", "Strasbourg", "Toulouse", "Troyes", "Bordeaux", "Saint-Étienne", "Guingamp", "Nancy", "Valenciennes", "Le Havre", "Caen", "Nîmes", "Dijon", "Amiens"},
// Liga MX
{"América", "Chivas", "Cruz Azul", "Pumas", "Tigres", "Monterrey", "Atlas", "León", "Pachuca", "Toluca", "Santos", "Puebla", "Necaxa", "Mazatlán", "Juárez", "Atlético San Luis", "Querétaro", "Tijuana", "FC Juárez", "Morelia", "Celaya", "Cimarrones", "Tampico", "Oaxaca", "Cancún", "Venados", "Mineros", "Atlético Zacatecas", "Tepatitlán", "Raya2"},
// Brasileirão
{"Flamengo", "Palmeiras", "Corinthians", "São Paulo", "Santos", "Grêmio", "Internacional", "Cruzeiro", "Atlético Mineiro", "Botafogo", "Fluminense", "Vasco", "Bahia", "Fortaleza", "Sport Recife", "Ceará", "Atlético Paranaense", "Coritiba", "Goiás", "Vitória", "América Mineiro", "Avaí", "Chapecoense", "Juventude", "Náutico", "Ponte Preta", "Bragantino", "Cuiabá", "Sampaio Corrêa", "Tombense"}
};
// ============================================================
// 7 SEGUNDAS DIVISIONES - 30 EQUIPOS
// ============================================================
String[][] segundasDivisiones = {
// Championship
{"Norwich City", "Watford", "Swansea", "West Bromwich", "Sheffield Wed", "Bristol City", "Millwall", "Preston", "Luton Town", "Hull City", "Reading", "Birmingham", "Coventry", "Oxford Utd", "Blackpool", "Rotherham", "Stevenage", "Cambridge Utd", "Burton Albion", "Peterborough", "Barnsley", "Charlton", "Wigan", "Bolton", "Fleetwood", "Portsmouth", "Derby County", "Wycombe", "Crewe", "Accrington"},
// LaLiga Hypermotion
{"Alcorcón", "Amorebieta", "Andorra", "Burgos", "Cartagena", "Eibar", "Elche", "Eldense", "Espanyol", "Ferrol", "Huesca", "Levante", "Mirandés", "Oviedo", "Racing Ferrol", "Racing Santander", "Real Sociedad B", "Recreativo", "Sabadell", "San Fernando", "Sestao", "Sporting B", "Tenerife", "Valladolid B", "Villarreal B", "Zaragoza B", "Albacete B", "Betis B", "Celta B", "Málaga"},
// Serie B
{"Ascoli", "Bari", "Brescia", "Catanzaro", "Cesena", "Cittadella", "Como", "Cosenza", "Cremonese", "FeralpiSalò", "Lecco", "Modena", "Palermo", "Pescara", "Pisa", "Reggiana", "Reggina", "Salernitana", "Sampdoria", "Spezia", "Sudtirol", "Ternana", "Venezia", "Virtus Entella", "Vicenza", "Monza B", "Parma B", "Empoli B", "Fiorentina B", "Juventus B"},
// 2. Bundesliga
{"Arminia Bielefeld", "Braunschweig", "Darmstadt", "Duisburg", "Elversberg", "Fortuna Düsseldorf", "Greuther Fürth", "Hamburger SV", "Hannover", "Heidenheim", "Kaiserslautern", "Karlsruhe", "Magdeburg", "Nürnberg", "Osnabrück", "Paderborn", "Regensburg", "Rostock", "Sandhausen", "Schalke", "St. Pauli", "Ulm", "Wiesbaden", "Würzburg", "Aue", "Dresden", "Ingolstadt", "Lübeck", "Münster", "Oldenburg"},
// Ligue 2
{"Amiens", "Annecy", "Bastia", "Bordeaux", "Caen", "Dunkerque", "Grenoble", "Guingamp", "Laval", "Le Havre", "Nîmes", "Niort", "Pau", "Quevilly-Rouen", "Rodez", "Saint-Étienne", "Sochaux", "Valenciennes", "Vannes", "Versailles", "Auxerre B", "Bastia B", "Lens B", "Lille B", "Lorient B", "Lyon B", "Marseille B", "Monaco B", "Nice B", "Rennes B"},
// Liga de Expansión
{"Alebrijes", "Atlante", "Cancún", "Celaya", "Cimarrones", "Correcaminos", "Dorados", "Leones Negros", "Loros", "Mazatlán B", "Mineros", "Morelia", "Oaxaca", "Pioneros", "Raya2", "Salamanca", "Saltillo", "San Luis", "Sinaloa", "Tabasco", "Tampico", "Tapatío", "Tecos", "Tijuana B", "Tlaxcala", "UAT", "UMSNH", "Venados", "Veracruz", "Zacatecas"},
// Série B
{"Amazonas", "Avaí", "Brusque", "Chapecoense", "Criciúma", "CRB", "Goiás", "Guarani", "Ituano", "Juventude", "Londrina", "Mirassol", "Náutico", "Novorizontino", "Operário", "Paysandu", "Ponte Preta", "Remo", "Sampaio Corrêa", "Sport Recife B", "Tombense", "Vila Nova", "Volta Redonda", "Ypiranga", "Zequinha", "Brusque B", "Ceará B", "Fortaleza B", "Bahia B", "Vitória B"}
};
String[] nombresLigas = {"Premier League", "LaLiga", "Serie A", "Bundesliga", "Ligue 1", "Liga MX", "Brasileirão"};
String[] nombresSegundas = {"Championship", "LaLiga Hypermotion", "Serie B", "2. Bundesliga", "Ligue 2", "Liga de Expansión", "Série B"};
int ligaActual = 0;
// ============================================================
// JUGADORES (5 POR EQUIPO)
// ============================================================
String[][][] jugadores = new String[7][30][5];
for (int l = 0; l < 7; l++) {
for (int e = 0; e < 30; e++) {
for (int j = 0; j < 5; j++) {
jugadores[l][e][j] = "Jug" + (l * 150 + e * 5 + j + 1);
}
}
}
// ============================================================
// JUGADORES DE 2ª DIVISIÓN (5 POR EQUIPO)
// ============================================================
String[][][] jugadoresSegunda = new String[7][30][5];
for (int l = 0; l < 7; l++) {
for (int e = 0; e < 30; e++) {
for (int j = 0; j < 5; j++) {
jugadoresSegunda[l][e][j] = "Jug2" + (l * 150 + e * 5 + j + 1);
}
}
}
// ============================================================
// CLASIFICACIÓN
// ============================================================
int[][] clasificacion = new int[30][2];
for (int i = 0; i < 30; i++) {
clasificacion[i][0] = random.nextInt(10) + 5;
clasificacion[i][1] = random.nextInt(30) + 10;
}
// ============================================================
// ESCUDO
// ============================================================
System.out.println(ROJO + " █████████████ " + RESET);
System.out.println(ROJO + " ██" + AZUL + " " + ROJO + "██ ");
System.out.println(ROJO + " ██ " + AMARILLO + " ⚽ ⚽ ⚽ " + ROJO + " ██ ");
System.out.println(ROJO + " ██ " + VERDE + " ███████ " + ROJO + " ██ ");
System.out.println(ROJO + " ██ " + VERDE + " █████████ " + ROJO + " ██ ");
System.out.println(ROJO + " ██ " + VERDE + " █████████ " + ROJO + " ██ ");
System.out.println(ROJO + " ██ " + VERDE + " ███████ " + ROJO + " ██ ");
System.out.println(ROJO + " ██ " + VERDE + " ███ " + ROJO + " ██ ");
System.out.println(ROJO + " █████████████ " + RESET);
System.out.println(AMARILLO + " " + nombreEquipo + " ⚽ 2026 " + RESET);
System.out.println(AMARILLO + " FM SIMULATOR v1.1 " + RESET);
System.out.println("🏆 " + nombresLigas[ligaActual]);
System.out.println("💰 " + dinero + " MILLONES\n");
System.out.println(CYAN + "⭐ Tu equipo tiene jugadores de 2 y 3 estrellas." + RESET);
System.out.println(CYAN + " ¡Ficha jugadores TOP o vende a los que no quieras!" + RESET);
// ============================================================
// MENÚ PRINCIPAL
// ============================================================
while (true) {
System.out.println("\n" + CYAN + "┌──────────────────────────────────────┐" + RESET);
System.out.println(CYAN + "│ FM SIMULATOR v1.1 │" + RESET);
System.out.println(CYAN + "├──────────────────────────────────────┤" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 1. JUGAR PARTIDO │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 2. VER PLANTILLA │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 3. ESTADÍSTICAS │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 4. PRESUPUESTO │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 5. MERCADO DE FICHAJES │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 6. CANTERA │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 7. CLASIFICACIÓN │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 8. JORNADA EUROPEA │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │ 9. VER SEGUNDA DIVISIÓN │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "│ ┌────────────────────────────────┐ │" + RESET);
System.out.println(CYAN + "│ │10. SALIR │ │" + RESET);
System.out.println(CYAN + "│ └────────────────────────────────┘ │" + RESET);
System.out.println(CYAN + "└──────────────────────────────────────┘" + RESET);
System.out.print("Elige: ");
int opcion = scanner.nextInt();
if (opcion == 1) {
partidosJugados++;
contadorOfertas++;
String[] equiposLiga = ligas[ligaActual];
int rivalIndex = random.nextInt(equiposLiga.length);
String rival = equiposLiga[rivalIndex];
int golesLocal = 0;
int golesVisitante = 0;
String goleadoresLocal = "";
String goleadoresVisitante = "";
System.out.println("\n" + AMARILLO + "🏟️ PARTIDO VS " + rival + " 🏟️" + RESET);
System.out.println("⚽ ¡Comienza el partido!\n");
String[] jugadoresPropios = {"Brayan", "Messi", "Cristiano", "Neymar", "Mbappé", "Haaland", "Vinicius", "Salah"};
String[] jugadoresRival = {"De Bruyne", "Rodri", "Foden", "Bernardo", "Havertz", "Saka", "Rice", "Son"};
for (int minuto = 1; minuto <= 90; minuto++) {
if (random.nextInt(100) < 20) {
String jugador;
if (random.nextBoolean()) {
jugador = jugadoresPropios[random.nextInt(jugadoresPropios.length)];
golesLocal++;
goleadoresLocal += jugador + " ";
if (miPlantilla.size() > 0) {
String jugadorReal = miPlantilla.get(random.nextInt(miPlantilla.size()));
if (golesJugadores.containsKey(jugadorReal)) {
golesJugadores.put(jugadorReal, golesJugadores.get(jugadorReal) + 1);
}
System.out.println(" ⚽ Min " + minuto + ": " + VERDE + "¡GOL DE " + nombreEquipo + "!" + RESET);
System.out.println(" " + jugador + " (" + golesJugadores.get(jugadorReal) + " goles)");
}
} else {
jugador = jugadoresRival[random.nextInt(jugadoresRival.length)];
golesVisitante++;
goleadoresVisitante += jugador + " ";
System.out.println(" ⚽ Min " + minuto + ": " + ROJO + "¡GOL DE " + rival + "!" + RESET);
System.out.println(" " + jugador + " anotó con un disparo potente.");
}
}
if (minuto % 10 == 0) {
System.out.println(" ⏱️ Minuto " + minuto + " - " + nombreEquipo + " " + golesLocal + " : " + golesVisitante + " " + rival);
}
}
System.out.println("\n" + AMARILLO + "🏁 ¡FIN DEL PARTIDO!" + RESET);
System.out.println("📊 RESULTADO FINAL:");
System.out.println(" " + nombreEquipo + " " + golesLocal + " : " + golesVisitante + " " + rival);
System.out.println("💰 Dinero antes: " + dinero + " MILLONES");
if (golesLocal > golesVisitante) {
System.out.println(VERDE + "🎉 ¡VICTORIA!" + RESET);
ganados++;
dinero += 5;
System.out.println(VERDE + "💰 Dinero después: " + dinero + " MILLONES (+5)" + RESET);
clasificacion[0][1] += 3;
clasificacion[0][0]++;
} else if (golesLocal < golesVisitante) {
System.out.println(ROJO + "😞 DERROTA" + RESET);
perdidos++;
dinero -= 2;
System.out.println(ROJO + "💰 Dinero después: " + dinero + " MILLONES (-2)" + RESET);
clasificacion[0][0]++;
} else {
System.out.println(AMARILLO + "🤝 EMPATE" + RESET);
empatados++;
System.out.println(AMARILLO + "💰 Dinero después: " + dinero + " MILLONES (0)" + RESET);
clasificacion[0][1] += 1;
clasificacion[0][0]++;
}
System.out.println("⚽ Goles de " + nombreEquipo + ": " + goleadoresLocal);
System.out.println("⚽ Goles de " + rival + ": " + goleadoresVisitante);
System.out.println("💰 Presupuesto actual: " + dinero + " MILLONES");
// ============================================================
// ASCENSOS Y DESCENSOS (CADA 10 PARTIDOS)
// ============================================================
if (partidosJugados % 10 == 0) {
System.out.println("\n" + AMARILLO + "📊 ACTUALIZACIÓN DE CLASIFICACIÓN" + RESET);
System.out.println(" Los últimos 3 equipos de 1ª división descienden.");
System.out.println(" Los primeros 3 equipos de 2ª división ascienden.");
String[] equiposLigaActual = ligas[ligaActual];
String[] equiposSegundaActual = segundasDivisiones[ligaActual];
String descendido1 = equiposLigaActual[equiposLigaActual.length - 1];
String descendido2 = equiposLigaActual[equiposLigaActual.length - 2];
String descendido3 = equiposLigaActual[equiposLigaActual.length - 3];
String ascendido1 = equiposSegundaActual[0];
String ascendido2 = equiposSegundaActual[1];
String ascendido3 = equiposSegundaActual[2];
System.out.println(" ⬇️ DESCENDIDOS A 2ª DIVISIÓN:");
System.out.println(" - " + descendido1);
System.out.println(" - " + descendido2);
System.out.println(" - " + descendido3);
System.out.println(" ⬆️ ASCENDIDOS A 1ª DIVISIÓN:");
System.out.println(" - " + ascendido1);
System.out.println(" - " + ascendido2);
System.out.println(" - " + ascendido3);
equiposLigaActual[equiposLigaActual.length - 1] = ascendido1;
equiposLigaActual[equiposLigaActual.length - 2] = ascendido2;
equiposLigaActual[equiposLigaActual.length - 3] = ascendido3;
equiposSegundaActual[0] = descendido1;
equiposSegundaActual[1] = descendido2;
equiposSegundaActual[2] = descendido3;
System.out.println(VERDE + " ✅ ¡Ascensos y descensos completados!" + RESET);
}
}
else if (opcion == 2) {
System.out.println("\n" + CYAN + "📋 PLANTILLA DE " + nombreEquipo + RESET);
System.out.println(" ⭐ = 2 estrellas | ⭐⭐⭐ = 3 estrellas | ⭐⭐⭐⭐⭐ = 5 estrellas\n");
if (miPlantilla.size() == 0) {
System.out.println(" No tienes jugadores en tu plantilla.");
} else {
for (int i = 0; i < miPlantilla.size(); i++) {
String jugador = miPlantilla.get(i);
int goles = golesJugadores.getOrDefault(jugador, 0);
int asistencias = asistenciasJugadores.getOrDefault(jugador, 0);
System.out.println(" " + (i+1) + ". " + jugador + " (G:" + goles + " A:" + asistencias + ")");
}
// ============================================================
// VENTA DE JUGADORES
// ============================================================
System.out.println("\n" + AMARILLO + "💰 ¿Quieres vender a algún jugador?" + RESET);
System.out.print(" Escribe el número del jugador a vender (o 0 para salir): ");
int numVenta = scanner.nextInt();
if (numVenta > 0 && numVenta <= miPlantilla.size()) {
String jugadorVendido = miPlantilla.get(numVenta - 1);
int goles = golesJugadores.getOrDefault(jugadorVendido, 0);
int asistencias = asistenciasJugadores.getOrDefault(jugadorVendido, 0);
int precioVenta = 0;
if (jugadorVendido.contains("Delantero")) {
precioVenta = 10;
if (goles >= 40) precioVenta = 50 + random.nextInt(21);
else if (goles >= 30) precioVenta = 35 + random.nextInt(16);
else if (goles >= 20) precioVenta = 20 + random.nextInt(16);
else if (goles >= 10) precioVenta = 15 + random.nextInt(6);
} else if (jugadorVendido.contains("Mediocampista")) {
precioVenta = 8;
if (asistencias >= 30) precioVenta = 40 + random.nextInt(21);
else if (asistencias >= 20) precioVenta = 25 + random.nextInt(16);
else if (asistencias >= 10) precioVenta = 15 + random.nextInt(11);
} else {
precioVenta = 5;
int porterias = porteriasCero.getOrDefault(jugadorVendido, 0);
if (porterias >= 20) precioVenta = 25 + random.nextInt(21);
else if (porterias >= 10) precioVenta = 15 + random.nextInt(16);
}
System.out.println(VERDE + "✅ ¡Has vendido a " + jugadorVendido + " por " + precioVenta + " MILLONES!" + RESET);
System.out.println(" 📊 Estadísticas: " + goles + " goles, " + asistencias + " asistencias.");
miPlantilla.remove(numVenta - 1);
dinero += precioVenta;
System.out.println("💰 Nuevo presupuesto: " + dinero + " MILLONES");
} else if (numVenta != 0) {
System.out.println(ROJO + "❌ Número inválido." + RESET);
}
}
System.out.println("\n🔄 SUPLENTES:");
for (int i = 0; i < suplentes.size(); i++) {
System.out.println(" " + (i+1) + ". " + suplentes.get(i));
}
System.out.println("💰 Presupuesto: " + dinero + " MILLONES");
}
else if (opcion == 3) {
System.out.println("\n" + CYAN + "📊 ESTADÍSTICAS DE " + nombreEquipo + ":" + RESET);
System.out.println(" Partidos: " + partidosJugados);
System.out.println(" Ganados: " + ganados);
System.out.println(" Perdidos: " + perdidos);
System.out.println(" Empatados: " + empatados);
System.out.println("💰 Presupuesto: " + dinero + " MILLONES");
}
else if (opcion == 4) {
System.out.println("\n" + AMARILLO + "💰 PRESUPUESTO: " + dinero + " MILLONES" + RESET);
if (dinero > 500) System.out.println("🏆 ¡ERES UN MAGNATE!");
else if (dinero > 200) System.out.println("💪 Vas muy bien.");
else if (dinero > 50) System.out.println("📉 Estás justo, gana partidos.");
else System.out.println(ROJO + "⚠️ ¡ALERTA ROJA! ¡Gana partidos!" + RESET);
}
else if (opcion == 5) {
System.out.println("\n🔄 MERCADO DE FICHAJES (2024-2026):");
System.out.println(" ===== FICHAJES 2023-2024 =====");
System.out.println(" - Declan Rice (West Ham → Arsenal) - 105M €");
System.out.println(" - Harry Kane (Tottenham → Bayern Munich) - 100M €");
System.out.println(" - Jude Bellingham (Dortmund → Real Madrid) - 103M €");
System.out.println(" - Rasmus Højlund (Atalanta → Man Utd) - 85M €");
System.out.println(" - Moisés Caicedo (Brighton → Chelsea) - 116M €");
System.out.println(" - Randal Kolo Muani (Eintracht → PSG) - 70M €");
System.out.println(" - Endrick (Palmeiras → Real Madrid) - 72M €");
System.out.println(" ===== FICHAJES 2024-2025 =====");
System.out.println(" - Victor Osimhen (Napoli → PSG) - 90M €");
System.out.println(" - Khvicha Kvaratskhelia (Napoli → PSG) - 80M €");
System.out.println(" - Dani Olmo (RB Leipzig → Barcelona) - 60M €");
System.out.println(" - Ronald Araújo (Barcelona → Bayern) - 70M €");
System.out.println(" - Lucas Chevalier (Lille → PSG) - 40M €");
System.out.println(" - Álex Baena (Villarreal → Atlético Madrid) - 42M €");
System.out.println(" - Dean Huijsen (Bournemouth → Real Madrid) - 62.5M €");
System.out.println(" - Álvaro Carreras → Real Madrid - 50M €");
System.out.println(" - Georges Mikautadze (Lyon → Villarreal) - 31M €");
System.out.println(" - Renato Veiga → Villarreal - 24.5M €");
System.out.println(" - Alexander Isak (Newcastle → Liverpool) - 144M €");
System.out.println(" - Florian Wirtz (Leverkusen → Liverpool) - 125M €");
System.out.println(" ===== FICHAJES 2025-2026 =====");
System.out.println(" - Elliot Anderson (N. Forest → Man City) - 135M €");
System.out.println(" - Sandro Tonali (Newcastle → Tottenham) - 117M €");
System.out.println(" - Gonçalo Ramos (PSG → AC Milan) - 75M €");
System.out.println(" - Nico Paz (Real Madrid → Como) - 60M €");
System.out.println(" - Marco Palestra (Atalanta → Chelsea) - 55M €");
System.out.println(" - Jeremy Jacquet (Rennes → Liverpool) - 60M €");
System.out.println(" - Alejandro Grimaldo (Leverkusen → Atlético) - 19M €");
System.out.println(" - Piero Hincapie (Leverkusen → Arsenal) - 34.5M €");
System.out.println(" - Mateus Fernandes (West Ham → Tottenham) - 85M €");
System.out.println(" - Georgiy Sudakov (Shakhtar → Liverpool) - 50M €");
System.out.println(" - Igor Paixão (Feyenoord → Man City) - 65M €");
System.out.println(" - Antoine Semenyo (Bournemouth → Man City) - 72M €");
System.out.println(" - Ademola Lookman → Atlético Madrid - 35M €");
System.out.println(" - Luis Milla (Getafe → Como) - 6M €");
System.out.println("\n💰 Tu presupuesto: " + dinero + " MILLONES");
System.out.print("¿Quieres fichar a alguno? (escribe nombre o 'no'): ");
scanner.nextLine();
String fichaje = scanner.nextLine();
// SISTEMA DE FICHAJES ACTUALIZADO
if (fichaje.equalsIgnoreCase("Mbappé") || fichaje.equalsIgnoreCase("Lewandowski")) {
System.out.println(VERDE + "✅ ¡Fichaste a " + fichaje + " en calidad de agente libre!" + RESET);
miPlantilla.add("⭐⭐⭐⭐⭐ " + fichaje + " (Delantero)");
} else if (fichaje.equalsIgnoreCase("Bellingham") && dinero >= 103) {
dinero -= 103; miPlantilla.add("⭐⭐⭐⭐ Jude Bellingham (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Bellingham! -103M" + RESET);
} else if (fichaje.equalsIgnoreCase("Rice") && dinero >= 105) {
dinero -= 105; miPlantilla.add("⭐⭐⭐ Declan Rice (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Rice! -105M" + RESET);
} else if (fichaje.equalsIgnoreCase("Kane") && dinero >= 100) {
dinero -= 100; miPlantilla.add("⭐⭐⭐⭐ Harry Kane (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Kane! -100M" + RESET);
} else if (fichaje.equalsIgnoreCase("Caicedo") && dinero >= 116) {
dinero -= 116; miPlantilla.add("⭐⭐⭐ Moisés Caicedo (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Caicedo! -116M" + RESET);
} else if (fichaje.equalsIgnoreCase("Osimhen") && dinero >= 90) {
dinero -= 90; miPlantilla.add("⭐⭐⭐⭐ Victor Osimhen (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Osimhen! -90M" + RESET);
} else if (fichaje.equalsIgnoreCase("Kvaratskhelia") && dinero >= 80) {
dinero -= 80; miPlantilla.add("⭐⭐⭐ Khvicha Kvaratskhelia (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Kvaratskhelia! -80M" + RESET);
} else if (fichaje.equalsIgnoreCase("Højlund") && dinero >= 85) {
dinero -= 85; miPlantilla.add("⭐⭐⭐ Rasmus Højlund (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Højlund! -85M" + RESET);
} else if (fichaje.equalsIgnoreCase("Olmo") && dinero >= 60) {
dinero -= 60; miPlantilla.add("⭐⭐⭐ Dani Olmo (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Olmo! -60M" + RESET);
} else if (fichaje.equalsIgnoreCase("Araújo") && dinero >= 70) {
dinero -= 70; miPlantilla.add("⭐⭐⭐⭐ Ronald Araújo (Defensa)");
System.out.println(VERDE + "✅ ¡Fichaste a Araújo! -70M" + RESET);
} else if (fichaje.equalsIgnoreCase("Anderson") && dinero >= 135) {
dinero -= 135; miPlantilla.add("⭐⭐ Elliot Anderson (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Anderson! -135M" + RESET);
} else if (fichaje.equalsIgnoreCase("Chevalier") && dinero >= 40) {
dinero -= 40; miPlantilla.add("⭐⭐⭐ Lucas Chevalier (Portero)");
System.out.println(VERDE + "✅ ¡Fichaste a Chevalier! -40M" + RESET);
} else if (fichaje.equalsIgnoreCase("Tonali") && dinero >= 117) {
dinero -= 117; miPlantilla.add("⭐⭐⭐ Sandro Tonali (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Tonali! -117M" + RESET);
} else if (fichaje.equalsIgnoreCase("Ramos") && dinero >= 75) {
dinero -= 75; miPlantilla.add("⭐⭐⭐ Gonçalo Ramos (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Ramos! -75M" + RESET);
} else if (fichaje.equalsIgnoreCase("Nico Paz") && dinero >= 60) {
dinero -= 60; miPlantilla.add("⭐⭐ Nico Paz (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Nico Paz! -60M" + RESET);
} else if (fichaje.equalsIgnoreCase("Kolo Muani") && dinero >= 70) {
dinero -= 70; miPlantilla.add("⭐⭐⭐ Randal Kolo Muani (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Kolo Muani! -70M" + RESET);
} else if (fichaje.equalsIgnoreCase("Endrick") && dinero >= 72) {
dinero -= 72; miPlantilla.add("⭐⭐ Endrick (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Endrick! -72M" + RESET);
} else if (fichaje.equalsIgnoreCase("Grimaldo") && dinero >= 19) {
dinero -= 19; miPlantilla.add("⭐⭐⭐ Alejandro Grimaldo (Defensa)");
System.out.println(VERDE + "✅ ¡Fichaste a Grimaldo! -19M" + RESET);
} else if (fichaje.equalsIgnoreCase("Hincapie") && dinero >= 34) {
dinero -= 34; miPlantilla.add("⭐⭐⭐ Piero Hincapie (Defensa)");
System.out.println(VERDE + "✅ ¡Fichaste a Hincapie! -34.5M" + RESET);
} else if (fichaje.equalsIgnoreCase("Fernandes") && dinero >= 85) {
dinero -= 85; miPlantilla.add("⭐⭐⭐ Mateus Fernandes (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Fernandes! -85M" + RESET);
} else if (fichaje.equalsIgnoreCase("Sudakov") && dinero >= 50) {
dinero -= 50; miPlantilla.add("⭐⭐⭐ Georgiy Sudakov (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Sudakov! -50M" + RESET);
} else if (fichaje.equalsIgnoreCase("Paixão") && dinero >= 65) {
dinero -= 65; miPlantilla.add("⭐⭐⭐ Igor Paixão (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Paixão! -65M" + RESET);
} else if (fichaje.equalsIgnoreCase("Semenyo") && dinero >= 72) {
dinero -= 72; miPlantilla.add("⭐⭐⭐ Antoine Semenyo (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Semenyo! -72M" + RESET);
} else if (fichaje.equalsIgnoreCase("Lookman") && dinero >= 35) {
dinero -= 35; miPlantilla.add("⭐⭐⭐ Ademola Lookman (Delantero)");
System.out.println(VERDE + "✅ ¡Fichaste a Lookman! -35M" + RESET);
} else if (fichaje.equalsIgnoreCase("Milla") && dinero >= 6) {
dinero -= 6; miPlantilla.add("⭐⭐ Luis Milla (Mediocampista)");
System.out.println(VERDE + "✅ ¡Fichaste a Milla! -6M" + RESET);
} else if (!fichaje.equalsIgnoreCase("no")) {
System.out.println(ROJO + "❌ No tienes suficiente dinero o el jugador no existe." + RESET);
}
}
else if (opcion == 6) {
System.out.println("\n" + CYAN + "🌟 CANTERA DE " + nombreEquipo + " 🌟" + RESET);
for (String[] jugador : cantera) {
System.out.println(" - " + jugador[0] + " (" + jugador[1] + " años) - " + jugador[2] + " - Nivel " + jugador[3]);
System.out.println(" " + jugador[4]);
}
System.out.print("¿Quieres hacer debutar a alguno? (escribe nombre o 'no'): ");
scanner.nextLine();
String debut = scanner.nextLine();
boolean encontrado = false;
for (int i = 0; i < cantera.length; i++) {
if (cantera[i][0].equalsIgnoreCase(debut)) {
System.out.println(VERDE + "✅ ¡" + cantera[i][0] + " debuta en el primer equipo!" + RESET);
System.out.println(" 📈 Nivel sube de " + cantera[i][3] + " a " + (Integer.parseInt(cantera[i][3]) + 5));
miPlantilla.add("⭐ " + cantera[i][0] + " (" + cantera[i][2] + ") - " + cantera[i][1] + " años");
golesJugadores.put(cantera[i][0] + " (" + cantera[i][2] + ") - " + cantera[i][1] + " años", 0);
asistenciasJugadores.put(cantera[i][0] + " (" + cantera[i][2] + ") - " + cantera[i][1] + " años", 0);
porteriasCero.put(cantera[i][0] + " (" + cantera[i][2] + ") - " + cantera[i][1] + " años", 0);
System.out.println(" 📋 Se ha añadido a tu plantilla como promesa (⭐).");
cantera[i][3] = String.valueOf(Integer.parseInt(cantera[i][3]) + 5);
encontrado = true;
break;
}
}
if (!encontrado && !debut.equalsIgnoreCase("no")) {
System.out.println(ROJO + "❌ No tienes a ese jugador en la cantera." + RESET);
}
}
else if (opcion == 7) {
System.out.println("\n" + CYAN + "🏆 CLASIFICACIÓN DE " + nombresLigas[ligaActual] + RESET);
System.out.println(" Pos | Equipo | PJ | Pts");
System.out.println(" ---------------------------------");
String[] equiposLiga = ligas[ligaActual];
for (int i = 0; i < equiposLiga.length; i++) {
int puntos = 0;
int partidos = 0;
if (i == 0 && ligaActual == 0) {
puntos = clasificacion[0][1];
partidos = clasificacion[0][0];
} else {
puntos = random.nextInt(30) + 10;
partidos = random.nextInt(10) + 5;
}
String color = (i < 4) ? VERDE : (i < 8) ? AZUL : (i < 12) ? AMARILLO : RESET;
System.out.println(color + " " + (i+1) + " | " + equiposLiga[i] + " | " + partidos + " | " + puntos + RESET);
}
System.out.println("\n 🏆 Champions League (1-4): " + VERDE + "Verde" + RESET);
System.out.println(" 🥈 Europa League (5-8): " + AZUL + "Azul" + RESET);
System.out.println(" 🥉 Conference League (9-12): " + AMARILLO + "Amarillo" + RESET);
}
else if (opcion == 8) {
System.out.println("\n🏆 COMPETICIONES EUROPEAS 🏆");
System.out.println(" ===========================");
System.out.println(" 🏆 CHAMPIONS LEAGUE");
System.out.println(" ---------------------------");
System.out.println(" Los 4 mejores de la liga clasifican.");
System.out.println("\n 🥈 EUROPA LEAGUE");
System.out.println(" ---------------------------");
System.out.println(" Equipos del 5º al 8º puesto.");
System.out.println("\n 🥉 CONFERENCE LEAGUE");
System.out.println(" ---------------------------");
System.out.println(" Equipos del 9º al 12º puesto.");
System.out.println("\n💡 Las competiciones europeas se juegan entre semana.");
System.out.print("¿Quieres simular una jornada europea? (s/n): ");
scanner.nextLine();
String europa = scanner.nextLine();
if (europa.equalsIgnoreCase("s")) {
System.out.println("\n🏟️ JORNADA EUROPEA SIMULADA 🏟️");
String[] rivales = {"Bayern Munich", "PSG", "Barcelona", "Real Madrid", "Inter Milan", "Juventus"};
String rival = rivales[random.nextInt(rivales.length)];
int resultado = random.nextInt(3);
if (resultado == 0) {
System.out.println(VERDE + "🎉 ¡VICTORIA EN EUROPA!" + RESET);
System.out.println(" " + nombreEquipo + " 2-1 " + rival);
dinero += 10;
} else if (resultado == 1) {
System.out.println(ROJO + "😞 DERROTA EN EUROPA" + RESET);
System.out.println(" " + nombreEquipo + " 0-2 " + rival);
dinero -= 3;
} else {
System.out.println(AMARILLO + "🤝 EMPATE EN EUROPA" + RESET);
System.out.println(" " + nombreEquipo + " 1-1 " + rival);
}
System.out.println("💰 Presupuesto: " + dinero + " MILLONES");
}
}
else if (opcion == 9) {
System.out.println("\n" + CYAN + "🏆 SEGUNDA DIVISIÓN DE " + nombresSegundas[ligaActual] + RESET);
System.out.println("📋 " + segundasDivisiones[ligaActual].length + " EQUIPOS:");
String[] equiposSegunda = segundasDivisiones[ligaActual];
for (int i = 0; i < equiposSegunda.length; i++) {
String color = i < 3 ? VERDE : (i < 20 ? AMARILLO : ROJO);
System.out.println(color + " " + (i+1) + ". " + equiposSegunda[i] + RESET);
}
System.out.println("\n " + VERDE + "Los 3 primeros ascienden a 1ª división." + RESET);
System.out.println(" " + ROJO + "Los 3 últimos descienden a 2ª división." + RESET);
}
else if (opcion == 10) {
System.out.println("\n👋 ¡Hasta luego, entrenador!");
System.out.println("💰 Presupuesto final: " + dinero + " MILLONES");
System.out.println("🏆 Partidos jugados: " + partidosJugados);
System.out.println("🏆 Partidos ganados: " + ganados);
System.out.println("📋 Jugadores en tu plantilla: " + miPlantilla.size());
break;
}
else {
System.out.println("❌ Opción inválida.");
}
}
scanner.close();
}
}
To embed this project on your website, copy the following code and paste it into your website's HTML: