declarar Jugador como clase estatica
This commit is contained in:
1 parent
5170e7b2e7
commit
43d1b4d5a9
1 file changed
+3
-4
+3
-4
@@ -2,7 +2,7 @@ import java.util.Random;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class Metodos7 {
|
||||
private class Jugador {
|
||||
private static class Jugador {
|
||||
String nombre = "Anonimo";
|
||||
int puntos = 0;
|
||||
}
|
||||
@@ -15,9 +15,8 @@ public class Metodos7 {
|
||||
Random r = new Random();
|
||||
int puntosParaGanar = 1000;
|
||||
|
||||
Metodos7 juego = new Metodos7();
|
||||
Jugador j1 = juego.new Jugador();
|
||||
Jugador j2 = juego.new Jugador();
|
||||
Jugador j1 = new Jugador();
|
||||
Jugador j2 = new Jugador();
|
||||
|
||||
switch (menuPrincipal(sc)) {
|
||||
case 1: // Configuración
|
||||
|
||||
Reference in new issue
Block a user