id
stringlengths 36
36
| text
stringlengths 1
1.25M
|
---|---|
e4526f07-8d6d-4738-9bfd-1a8663b0151b | @Override
public int length() {
return containedList.length();
} |
b5e53180-3acc-4a45-8e04-c9dd0c073cda | @Override
public Iterator<F> iterator() {
// TODO Auto-generated method stub
return null;
} |
fefe3a28-2c7e-4917-ab6d-e3b20b688601 | @Override
public List<F> reverse() {
// TODO Auto-generated method stub
return null;
} |
4932e065-a442-4817-9458-807c7b8e016a | public FiltererList(List<E> containedList, Function<E, Boolean> condition) {
super();
this.containedList = containedList;
this.condition = condition;
} |
5a68de0f-f79f-478b-921f-90cb2ad97fea | @Override
public List<E> add(E item) {
return new SimpleList<E>(item, this);
} |
1713e9e9-3972-4c13-91cd-44546c89bef4 | @Override
public Optional<E> get(int index) {
if (index == 0 && containedList.head().map(condition).get()) {
return containedList.head();
} else if (containedList.isEmpty()) {
return Optional.empty();
} else if (containedList.head().map(condition).get()) {
return tail().get(index - 1);
} else {
return tail().get(index);
}
} |
8295274e-7049-419b-bc88-f1ff5153728e | @Override
public <F> List<F> map(Function<E, F> mapper) {
return new MapperList<E, F>(this, mapper);
} |
02537995-39f3-40d0-af64-8e3bf489fcca | @Override
public <F> List<F> flatMap(Function<E, List<F>> flatMapper) {
return new FlatMapperList<E, F>(this, flatMapper);
} |
08c7b9f3-32ec-4c53-bbd1-d0ba81e83390 | @Override
public List<E> filter(Function<E, Boolean> selector) {
return new FiltererList<E>(this, selector);
} |
989edf4e-2207-4c8e-beac-a295c0d2e420 | @Override
public boolean contains(E item) {
if (condition.apply(item)) {
return containedList.contains(item);
} else {
return false;
}
} |
fdf982e6-6929-4c9b-9e8e-892cd91c07af | @Override
public boolean contains(Function<E, Boolean> selector) {
return containedList.contains(new Function<E, Boolean>() {
@Override
public Boolean apply(E t) {
return selector.apply(t) && condition.apply(t);
}
});
} |
4951b3e7-42f1-47f9-b1b5-3e68db95e942 | @Override
public Boolean apply(E t) {
return selector.apply(t) && condition.apply(t);
} |
23aca595-8eec-4986-8486-db680ffcd32d | @Override
public Optional<E> head() {
if (containedList.head().map(condition).get()) {
return containedList.head();
} else {
return tail().head();
}
} |
b7022cfd-d7da-49cf-88c6-b5c640e96f83 | @Override
public List<E> tail() {
return new FiltererList<E>(containedList.tail(), condition);
} |
10826fb9-d4b9-42b3-9c23-494c1382707c | @Override
public boolean isEmpty() {
if (containedList.isEmpty()) {
return true;
} else if (containedList.head().map(condition).get()) {
return false;
} else {
return tail().isEmpty();
}
} |
5e4e7302-69a8-4390-bd40-5ca6d8bbbe27 | @Override
public int length() {
if (containedList.isEmpty()) {
return 0;
} else if (containedList.head().map(condition).get()) {
return 1 + tail().length();
} else {
return tail().length();
}
} |
53d29485-29d8-442f-a264-4b0ce1afa1bb | @Override
public Iterator<E> iterator() {
// TODO Auto-generated method stub
return null;
} |
ee08e03f-3819-4241-8d84-e67cdeb75b33 | @Override
public List<E> reverse() {
// TODO Auto-generated method stub
return null;
} |
d93caf28-c32a-47ce-a638-cb1a57d3af28 | @Override
public default Optional<E> get(int index) {
return Optional.empty();
} |
09c57c1b-cea7-471d-9b92-fd3b55fa3af2 | @Override
public default <F> List<F> map(Function<E, F> mapper) {
return new MapperList<E, F>(this, mapper);
} |
0cf7962b-4f5e-4b50-83ac-581923111fd7 | @Override
public default <F> List<F> flatMap(Function<E, List<F>> flatMapper) {
return new FlatMapperList<E, F>(this, flatMapper);
} |
37032b34-88bc-45b2-9047-7833757bebd0 | @Override
public default List<E> filter(Function<E, Boolean> selector) {
return this;
} |
89e3c83e-7df0-497f-8727-11bf61d15650 | @Override
public default boolean contains(E item) {
return false;
} |
de868f07-6f12-4d41-b4ab-757b2cab1025 | @Override
public default boolean contains(Function<E, Boolean> selector) {
return false;
} |
f31890c7-b471-40ef-952f-2396b3621c1e | @Override
public default Optional<E> head() {
return Optional.empty();
} |
00ad163e-fc60-45c4-8bc7-fcaec97eb221 | @Override
public default List<E> tail() {
return this;
} |
91444e0c-62f1-404f-804a-f15a0729c5a1 | @Override
public default boolean isEmpty() {
return true;
} |
f1d7ef0d-16cf-453b-88a4-b168ca732721 | @Override
public default int length() {
return 0;
} |
81bd94dd-35f1-4f61-aeeb-47d4fe86d011 | public FlatMapperList(List<E> containedList, Function<E, List<F>> flatMapper) {
super();
this.containedList = containedList;
this.flatMapper = flatMapper;
} |
a1315c02-46db-4793-be30-1156661f5c4b | @Override
public List<F> add(F item) {
return new SimpleList<F>(item, this);
} |
81cff3f6-30e8-4679-b6c6-ad134c253dae | @Override
public Optional<F> get(int index) {
Optional<List<F>> first = containedList.head().map(flatMapper);
if (first.isPresent()) {
List<F> firstList = first.get();
if (firstList.isEmpty()) {
return Optional.empty();
} else {
if (firstList.length() > index) {
return firstList.get(index);
} else {
return containedList.tail().flatMap(flatMapper)
.get(index - firstList.length());
}
}
} else {
return Optional.empty();
}
} |
07082107-ee18-4f12-b124-5deae26605d7 | @Override
public <G> List<G> map(Function<F, G> mapper) {
return new MapperList<F, G>(this, mapper);
} |
1872002c-d9c3-4444-8dfd-313f8b30eb69 | @Override
public <G> List<G> flatMap(Function<F, List<G>> flatMapper) {
return new FlatMapperList<F, G>(this, flatMapper);
} |
6c892ddc-8ce1-4784-b764-63f55ea0a27f | @Override
public List<F> filter(Function<F, Boolean> selector) {
return new FiltererList<F>(this, selector);
} |
dfb067a0-d046-421b-9260-729574984301 | @Override
public boolean contains(F item) {
if (containedList.isEmpty()) {
return false;
} else if (containedList.flatMap(flatMapper).head()
.equals(Optional.ofNullable(item))) {
return true;
} else {
return tail().contains(item);
}
} |
e5a1f449-db77-48fd-835e-5a133a1f2496 | @Override
public boolean contains(Function<F, Boolean> selector) {
if (containedList.isEmpty()) {
return false;
} else if (this.head().map(selector).get()) {
return true;
} else {
return tail().contains(selector);
}
} |
8b0619ca-858c-4472-aa44-a436cbe0a922 | @Override
public Optional<F> head() {
Optional<List<F>> headList = containedList.head().map(flatMapper);
if (headList.isPresent()) {
if (headList.get().length() > 0) {
return headList.get().head();
} else {
return tail().head();
}
} else {
return tail().head();
}
} |
9e4c74f6-a6c2-4ae2-b79e-c4a877c6990d | @Override
public List<F> tail() {
Optional<List<F>> headList = containedList.head().map(flatMapper);
if (headList.isPresent()) {
if (headList.get().length() > 0) {
return headList.get().tail();
} else {
return containedList.tail().flatMap(flatMapper);
}
} else {
return containedList.tail().flatMap(flatMapper);
}
} |
32da149e-d0b9-4af7-a747-1a705ab6aef4 | @Override
public boolean isEmpty() {
return containedList.isEmpty();
} |
69e9cdd7-e2cf-4925-8249-05861b16ada5 | @Override
public int length() {
return containedList.length();
} |
5d3f174c-9a44-44c4-8805-1171818c50c4 | @Override
public Iterator<F> iterator() {
// TODO Auto-generated method stub
return null;
} |
d5d34bb1-37a0-4fe1-8e72-23bae49b21fa | @Override
public List<F> reverse() {
// TODO Auto-generated method stub
return null;
} |
04903196-ff3f-4318-bc0e-976ec63e6d9a | public BreadthFirstSearchAlgorithm(SearchInfo searchInfo) {
this.searchInfo = searchInfo;
} |
b75d343d-b96d-4840-847b-c086f9ec5688 | public List<Node> getSearchedPath(Node start) {
return getSearchedPath(ListFactory.<Node>getEmptySimpleList().add(start));
} |
784f2d93-31e8-42dc-b195-73f8a30d8a6b | protected List<Node> getSearchedPath(List<Node> step) {
Node thisNode = step.head().get();
if(searchInfo.isGoal(thisNode)){
return step;
}
Iterable<Node> descendants = searchInfo.getDescendantNodes(step.head().get());
for(Node descendant:descendants){
List<Node> path = getSearchedPath(step.add(descendant));
if(!path.isEmpty()){
return path;
}
}
return ListFactory.getEmptySimpleList();
} |
b0025c4d-da00-44c4-9a43-873c578894b0 | public Iterable<Node> getDescendantNodes(Node node); |
4bfe70ff-0f08-4560-a4cc-cb58021d0aae | public boolean isGoal(Node node); |
bda002ca-71d8-452e-adb6-b61dbb38db47 | public int getHeuristic(Node node); |
fb8686b2-599b-415b-814d-b279e91067d6 | @Test
public void testAdd() {
List<Integer> list = ListFactory.getEmptySimpleList();
list = list.add(1).add(3).add(5).add(7);
assertEquals(5, list.get(2).get().intValue());
} |
26743e78-26c3-4d56-b70a-df25e4ea7207 | @Test
public void testMap() {
List<Integer> list = ListFactory.getEmptySimpleList();
list = list.add(1).add(3).add(5).add(7);
list = list.map((x) -> x * 2);
assertEquals(10, list.get(2).get().intValue());
} |
960b8978-4791-40a2-8c64-57655bb464f5 | @Test
public void testFlatMap() {
List<Integer> list = ListFactory.getEmptySimpleList();
list = list.add(1).add(3).add(5).add(7);
list = list.flatMap((x) -> {
List<Integer> l = ListFactory.getEmptySimpleList();
for (int i = 1; i <= x; i++) {
l = l.add(i);
}
System.out.println(l);
return l;
});
assertEquals(5, list.get(8).get().intValue());
assertEquals(2, list.get(10).get().intValue());
} |
468f054d-e29a-4982-84f9-d818d4a393a0 | @Test
public void testContains() {
List<Integer> list = ListFactory.getEmptySimpleList();
list = list.add(1).add(3).add(5).add(7);
assertTrue(list.contains(3));
assertFalse(list.contains(4));
assertTrue(list.contains((x) -> x == 3));
assertFalse(list.contains((x) -> x == 4));
} |
7e6691dc-099c-41cf-bf80-fdbb2c5117e4 | @Test
public void testFilter() {
List<Integer> list = ListFactory.getEmptySimpleList();
list = list.add(1).add(3).add(5).add(7);
list = list.filter((x) -> x > 2);
assertTrue(list.contains(3));
assertFalse(list.contains(1));
} |
676d379c-b21d-4f27-b6db-8e4025935871 | @Test
public void testAdd() {
List<Integer> list = ListFactory.getEmptyRandomAccessList();
list = list.add(1).add(3).add(5).add(7);
assertEquals(5, list.get(2).get().intValue());
} |
87ced344-7e68-430d-bc66-316fd10e581e | @Test
public void testMap() {
List<Integer> list = ListFactory.getEmptyRandomAccessList();
list = list.add(1).add(3).add(5).add(7);
list = list.map((x) -> x * 2);
assertEquals(10, list.get(2).get().intValue());
} |
ceac839a-bffc-4519-8fbf-b968ff54c027 | @Test
public void testFlatMap() {
List<Integer> list = ListFactory.getEmptyRandomAccessList();
list = list.add(1).add(3).add(5).add(7);
list = list.flatMap((x) -> {
List<Integer> l = ListFactory.getEmptyRandomAccessList();
for (int i = 1; i <= x; i++) {
l = l.add(i);
}
System.out.println(l);
return l;
});
assertEquals(5, list.get(8).get().intValue());
assertEquals(2, list.get(10).get().intValue());
} |
eea0a4bb-ba2d-40a5-b0ce-82b5b66bb41f | @Test
public void testContains() {
List<Integer> list = ListFactory.getEmptyRandomAccessList();
list = list.add(1).add(3).add(5).add(7);
assertTrue(list.contains(3));
assertFalse(list.contains(4));
assertTrue(list.contains((x) -> x == 3));
assertFalse(list.contains((x) -> x == 4));
} |
82b35f29-8ba6-4293-bbad-13838705f674 | @Test
public void testFilter() {
List<Integer> list = ListFactory.getEmptyRandomAccessList();
list = list.add(1).add(3).add(5).add(7);
list = list.filter((x) -> x > 2);
assertTrue(list.contains(3));
assertFalse(list.contains(1));
} |
76b3a063-2adb-44fd-8e51-1efdf2048a19 | public ConexionCliente(int Puerto) {
try {
sock = new Socket("localhost", Puerto);
} catch (IOException ex) {
Logger.getLogger(ConexionCliente.class.getName()).log(Level.SEVERE, null, ex);
}
} |
842ce508-e090-472b-89a5-711f872bed45 | public pelota Entrada_objeto() {
pelota pelota_actual = null;
try {
Entrada = sock.getInputStream();
Entrada_serializada = new ObjectInputStream(Entrada);
pelota_actual = (pelota) Entrada_serializada.readObject();
} catch (IOException ex) {
Logger.getLogger(ConexionCliente.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
Logger.getLogger(ConexionCliente.class.getName()).log(Level.SEVERE, null, ex);
}
return pelota_actual;
} |
0688f903-2a0e-4731-83f0-132422654077 | public void Salida_Obj_Equipo(cancha.equipo objE) {
try {
Salida = sock.getOutputStream();
Salida_serializada = new ObjectOutputStream(Salida);
Salida_serializada.writeObject(objE);
} catch (IOException ex) {
Logger.getLogger(ConexionCliente.class.getName()).log(Level.SEVERE, null, ex);
}
} |
79daa649-2c1d-4af1-a462-170693ef57dd | public void run() {
while (true) {
cancha.equipo equipo = new cancha.equipo();
Salida_Obj_Equipo(equipo);
Pelota = Entrada_objeto();
}
} |
3eeadd61-a95e-47ba-b69b-dcf36b0322da | public equipo() {
this.turno = 0;
this.equipo = "aqui va algo";
this.puntuacion = 0;
this.jugador = new ArrayList<jugador>();
} |
2a969bb3-3a1b-419b-91b6-3fa255cb71e4 | public equipo(int turno, String equipo, int puntuacion, ArrayList<jugador> jugador) {
this.turno = turno;
this.equipo = equipo;
this.puntuacion = puntuacion;
this.jugador = jugador;
} |
9acc3cef-7357-4c2a-972b-9c7d9d20575d | public ConexionServidor(int puerto) {
try {
ListaEquipo = new ArrayList<equipo>();
sockEquipos = new ArrayList<Socket>();
Puerto = new ServerSocket(20080);
Pelota = new pelota();
cont = 0;
} catch (IOException ex) {
Logger.getLogger(ConexionServidor.class.getName()).log(Level.SEVERE, null, ex);
}
} |
8538ac6f-7921-4cf1-a664-43e401b928ba | public void conexion(){
try {
socket = Puerto.accept();
sockEquipos.add(socket);
System.out.println("Conexión establecida");
} catch (IOException ex) {
Logger.getLogger(ConexionServidor.class.getName()).log(Level.SEVERE, null, ex);
}
} |
c5bafbd5-0a9e-4781-b8aa-156183a13dd8 | public void run(){
while(cont<2){
conexion();
ListaEquipo.add(Entrada_objeto(cont));
cont++;
}
while (true) {
for (int i = 0; i < 2; i++) {
Salida_obj_pelota(i, Pelota);
}
}
} |
267d05d4-5b27-49b0-a5e3-0c66e0b550ab | public equipo Entrada_objeto(int posEquipo){
cancha.equipo equipo_entrante = null;
try {
Entrada=sockEquipos.get(posEquipo).getInputStream();
Entrada_serializada = new ObjectInputStream(Entrada);
equipo_entrante = (cancha.equipo) Entrada_serializada.readObject();
System.out.println("Nombre equipo" + equipo_entrante.equipo);
} catch (IOException ex) {
Logger.getLogger(ConexionServidor.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
Logger.getLogger(ConexionServidor.class.getName()).log(Level.SEVERE, null, ex);
}
return equipo_entrante;
} |
a0ae9e0d-7a9f-4bd5-b5e3-882860730083 | public void Salida_obj_pelota(int posEquipo, pelota Pelota){
try {
Salida = sockEquipos.get(posEquipo).getOutputStream();
Salida_serializada = new ObjectOutputStream(Salida);
Pelota = new pelota();
Salida_serializada.writeObject(Pelota);
} catch (IOException ex) {
Logger.getLogger(ConexionServidor.class.getName()).log(Level.SEVERE, null, ex);
}
} |
d5363924-3b52-4a27-82be-98fe6c2879e6 | public void Salida_obj_eequipoContrario(int posEquipo, pelota Pelota){
try {
Salida = sockEquipos.get(posEquipo).getOutputStream();
Salida_serializada = new ObjectOutputStream(Salida);
Pelota = new pelota();
Salida_serializada.writeObject(Pelota);
} catch (IOException ex) {
Logger.getLogger(ConexionServidor.class.getName()).log(Level.SEVERE, null, ex);
}
} |
4ab66e4c-eb74-43d7-8fd7-4fe1d514ad37 | public void Pintar_Cancha() {
f.getContentPane().setLayout(null); /////frame juego
f.getContentPane().setBackground(Color.gray);
f.setBounds(150, 50, 1000, 700);
JButton Iniciar = new JButton("Iniciar");
Iniciar.setBounds(450, 30, 100, 50);
Iniciar.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent me) {
IniciarJuego();
}
});
f.add(Iniciar);
/*inicializacion de matriz logica y label*/
for (i = 3; i < fil; i++) {
for (j = 3; j < col; j++) {
log[i][j] = 0; ////////inicializo matriz log en 0;
if (i == 16) {
log[i][j] = 8; ///// numero 8 es la malla
}
}
}
/////////////jugadores equipo 1
log[5][5] = 1;
Equipo1[0] = new jugador(5, 5, 0, 0, 0, 0, 0, 0, "Defensa", 0, 1);
log[5][11] = 1;
Equipo1[1] = new jugador(5, 11, 0, 0, 0, 0, 0, 0, "Armador", 0, 1);
log[5][17] = 1;
Equipo1[2] = new jugador(5, 17, 0, 0, 0, 0, 0, 0, "Defensa", 1, 1);
/////posiciones estaticas iniciales equipo 1
log[12][5] = 1;
Equipo1[3] = new jugador(12, 5, 0, 0, 0, 0, 0, 0, "Atacante", 0, 1);
log[12][11] = 1;
Equipo1[4] = new jugador(12, 11, 0, 0, 0, 0, 0, 0, "Armador", 0, 1);
log[12][17] = 1;
Equipo1[5] = new jugador(12, 17, 0, 0, 0, 0, 0, 0, "Atacante", 0, 1);
////////////jugadores equipo 2
log[20][5] = 2;
Equipo2[0] = new jugador(20, 5, 0, 0, 0, 0, 0, 0, "Atacante", 0, 2);
log[20][11] = 2;
Equipo2[1] = new jugador(20, 11, 0, 0, 0, 0, 0, 0, "Armador", 0, 2);
log[20][17] = 2;
Equipo2[2] = new jugador(20, 11, 0, 0, 0, 0, 0, 0, "Atacante", 0, 2);
////// posiciones estaticas iniciales equipo 2
log[27][5] = 2;
Equipo2[3] = new jugador(27, 5, 0, 0, 0, 0, 0, 0, "Defensa", 1, 2);
log[27][11] = 2;
Equipo2[4] = new jugador(27, 11, 0, 0, 0, 0, 0, 0, "Armador", 0, 2);
log[27][17] = 2;
Equipo2[5] = new jugador(27, 17, 0, 0, 0, 0, 0, 0, "Defensa", 0, 2);
for (i = 2; i < 3; i++) {
for (j = 3; j < col; j++) {
lbl[i][j] = new JLabel();
lbl[i][j].setBounds(i * 30, j * 30, 32, 31);
f.add(lbl[i][j]);
}
}
for (i = 30; i < 31; i++) {
for (j = 3; j < col; j++) {
lbl[i][j] = new JLabel();
lbl[i][j].setBounds(i * 30, j * 30, 32, 31);
f.add(lbl[i][j]);
}
}
for (i = 3; i < fil-1; i++) {
for (j = 3; j < col; j++) {
lbl[i][j] = new JLabel(piso);
lbl[i][j].setBounds(i * 30, j * 30, 32, 31); /////inicializar matriz label
if (log[i][j] == 8) {
lbl[i][j].setIcon(malla);
}
if (log[i][j] == 1) {
lbl[i][j].setIcon(jugador1);
}
if (log[i][j] == 2) {
lbl[i][j].setIcon(jugador2);
}
f.add(lbl[i][j]);
}
}
Image img = pelota.getImage();
Image newimg = img.getScaledInstance(20, 20, java.awt.Image.SCALE_SMOOTH);
ImageIcon icon = new ImageIcon(newimg);
JLabel balon = new JLabel(icon);
balon.setBounds(10, 10, 30, 30);
f.add(balon);
f.setVisible(true);
f.setResizable(false);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
} |
c807b9c3-c7ef-4c66-aa48-88412468a992 | public void mousePressed(MouseEvent me) {
IniciarJuego();
} |
59f7e418-d829-48cf-b721-1375f4039bf5 | public void IniciarJuego() {
Random rand = new Random();
// nextInt is normally exclusive of the top value,
// so add 1 to make it inclusive
int randomNum = 1 + (int)(Math.random() * ((2 - 1) + 1));
System.out.println(randomNum);
jugador j = Servicio(randomNum);
j.HacerSaque(this);
} |
eac04f08-1f25-444a-b51d-1d4cde112326 | public jugador Servicio(int equipo) {
jugador[] jugadores;
jugador j = new jugador();
if (equipo == 1) {
jugadores = Equipo1;
} else {
jugadores = Equipo2;
}
for (int i = 0; i < jugadores.length; i++) {
if (jugadores[i].getSaque() == 1) {
j = jugadores[i];
break;
}
}
return j;
} |
4e5a1f5f-db71-4de8-8a87-9d50099538e4 | public static void main(String[] args) {
Main obj = new Main();
obj.Pintar_Cancha();
ConexionServidor Conn = new ConexionServidor(20080);
Conn.start();
} |
7229deaf-0317-4f05-a3f1-27d616c0720c | public jugador() {
this.Potencia = 0;
this.Velocidad = 0;
this.Salto = 0;
this.Precision = 0;
this.Resistencia = 0;
this.posX = 0;
this.posY = 0;
this.posZ = 0;
this.equipo = 0;
this.funcion = "Descripcion del jugador";
this.saque = 1;
this.equipo = 1;
} |
e3fb0781-59b5-4d6d-9068-aba8db14dd8d | public jugador(int posX, int posY, double posZ, int Potencia, int Velocidad, int Salto, int Precision, int Resistencia, String funcion, int saque, int equipo) {
this.posX = posX;
this.posY = posY;
this.posZ = posZ;
this.Potencia = Potencia;
this.Velocidad = Velocidad;
this.Salto = Salto;
this.Precision = Precision;
this.Resistencia = Resistencia;
this.funcion = funcion;
this.saque = saque;
this.equipo = equipo;
} |
9e7f0aba-c237-4bc2-827d-6e14f434c8e5 | public void setPosX(int posX) {
this.posX = posX;
} |
fe9ac1c6-9df5-4d90-a574-b11d1069416a | public void setPosY(int posY) {
this.posY = posY;
} |
1f02b712-d9b5-46c9-bca0-2a7d3b248ff2 | public void setPosZ(double posZ) {
this.posZ = posZ;
} |
bb6ec09a-2970-43cf-986c-a44e8fc71273 | public void setPotencia(int Potencia) {
this.Potencia = Potencia;
} |
bab25d4f-671e-43fd-84de-2a1a13389ff4 | public void setVelocidad(int Velocidad) {
this.Velocidad = Velocidad;
} |
a3f54fad-c928-4496-90c3-f5f77e7a8144 | public void setSalto(int Salto) {
this.Salto = Salto;
} |
c6ad13bd-8e76-4fc6-b4d9-25903433a91e | public void setPrecision(int Precision) {
this.Precision = Precision;
} |
99613b72-ab09-427b-bb3e-f01a4e74a65a | public void setResistencia(int Resistencia) {
this.Resistencia = Resistencia;
} |
9677e3c5-562e-4efd-bf2f-9960e53814a4 | public double getPosX() {
return posX;
} |
2cfd4ed6-993b-4805-bfad-61ad9713ccda | public double getPosY() {
return posY;
} |
2351ab2a-6577-45f6-96ce-f3bca1bc860b | public double getPosZ() {
return posZ;
} |
b4841775-0fcc-4bf0-bc93-51a66574a552 | public int getPotencia() {
return Potencia;
} |
0b8cb785-a3cb-4713-905c-ac9e88ea42fc | public int getVelocidad() {
return Velocidad;
} |
05f78bc7-38fc-4334-b9d6-9ec39cf5124c | public int getSalto() {
return Salto;
} |
14576869-d0cf-49c4-be65-9c8ee14475a3 | public int getPrecision() {
return Precision;
} |
880fbf3c-8606-4c12-80ec-fd8cf517bda0 | public int getResistencia() {
return Resistencia;
} |
0342987c-ee6c-49cb-9e49-9a7d34654681 | public String getFuncion() {
return funcion;
} |
c02fd4a2-2fc6-423c-bd1a-c923085a2c53 | public void setFuncion(String funcion) {
this.funcion = funcion;
} |
46e61dc1-696d-4b74-8375-0b9c8dd88349 | public int getSaque() {
return saque;
} |
f92cf67a-8b7d-47a8-9c14-9ecc75878d1c | public void setSaque(int saque) {
this.saque = saque;
} |
2ddefe53-7f18-4195-b2d7-cd292f32644d | public void HacerSaque(Main m){
int x = 0;
int y = 0;
if(this.equipo == 1){
x = 2;
y = 17;
}else{
x = 30;
y = 5;
}
m.log[this.posX][this.posY] = 0;
m.log[x][y] = this.equipo;
ImageIcon piso = new ImageIcon("piso.gif");
m.lbl[this.posX][this.posY].setIcon(piso);
ImageIcon icon;
if(this.equipo == 1){
icon = new ImageIcon("jugador1.png");
}else{
icon = new ImageIcon("jugador2.png");
}
m.lbl[x][y].setIcon(icon);
} |
0ac7946b-067b-4afb-968a-6f8989ecba3a | @Override
public double getPosX() {
return super.getPosX(); //To change body of generated methods, choose Tools | Templates.
} |
59836e58-e31d-43f8-889c-57816210a4e7 | @Override
public double getPosY() {
return super.getPosY(); //To change body of generated methods, choose Tools | Templates.
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.