From e48f9780c998bb96082c4c06459a9c3329b9482d Mon Sep 17 00:00:00 2001 From: Matias Vallejos Date: Thu, 23 Nov 2023 00:50:35 -0300 Subject: [PATCH] Reformat --- mapa.json | 210 +++++++++++++++--- src/main/java/edu/fiuba/algo3/App.java | 8 +- src/main/java/edu/fiuba/algo3/Message.java | 2 - .../java/edu/fiuba/algo3/modelo/AlgoRoma.java | 2 +- .../java/edu/fiuba/algo3/modelo/Dado.java | 2 +- .../edu/fiuba/algo3/modelo/estado/Sano.java | 2 +- .../fiuba/algo3/modelo/seniority/Novato.java | 2 +- 7 files changed, 187 insertions(+), 41 deletions(-) diff --git a/mapa.json b/mapa.json index 49f72d5..cd18c2c 100644 --- a/mapa.json +++ b/mapa.json @@ -1,32 +1,180 @@ [ - {"numeroCasilla": 0, "efecto": "Comida"}, - {"x": 0, "y": 0, "ordenRecorrido": 1, "efecto": "Comida"}, - {"x": 1, "y": 0, "esCamino": true, "ordenRecorrido": 3, "efecto": null}, - {"x": 2, "y": 0, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - {"x": 3, "y": 0, "esCamino": true, "ordenRecorrido": 2, "efecto": "Comida"}, - {"x": 4, "y": 0, "esCamino": true, "ordenRecorrido": 4, "efecto": null}, - - {"x": 0, "y": 1, "esCamino": true, "ordenRecorrido": 5, "efecto": "Bacanal"}, - {"x": 1, "y": 1, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - {"x": 2, "y": 1, "esCamino": true, "ordenRecorrido": 6, "efecto": null}, - {"x": 3, "y": 1, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - {"x": 4, "y": 1, "esCamino": true, "ordenRecorrido": 7, "efecto": "Fiera"}, - - {"x": 0, "y": 2, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - {"x": 1, "y": 2, "esCamino": true, "ordenRecorrido": 8, "efecto": null}, - {"x": 2, "y": 2, "esCamino": true, "ordenRecorrido": 9, "efecto": "Equipamiento"}, - {"x": 3, "y": 2, "esCamino": true, "ordenRecorrido": 10, "efecto": null}, - {"x": 4, "y": 2, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - - {"x": 0, "y": 3, "esCamino": true, "ordenRecorrido": 11, "efecto": "Equipamiento"}, - {"x": 1, "y": 3, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - {"x": 2, "y": 3, "esCamino": true, "ordenRecorrido": 12, "efecto": null}, - {"x": 3, "y": 3, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - {"x": 4, "y": 3, "esCamino": true, "ordenRecorrido": 13, "efecto": null}, - - {"x": 0, "y": 4, "esCamino": true, "ordenRecorrido": 14, "efecto": null}, - {"x": 1, "y": 4, "esCamino": true, "ordenRecorrido": 15, "efecto": null}, - {"x": 2, "y": 4, "esCamino": false, "ordenRecorrido": null, "efecto": null}, - {"x": 3, "y": 4, "esCamino": true, "ordenRecorrido": 16, "efecto": null}, - {"x": 4, "y": 4, "esCamino": true, "ordenRecorrido": 17, "efecto": null} -] + { + "numeroCasilla": 0, + "efecto": "Comida" + }, + { + "x": 0, + "y": 0, + "ordenRecorrido": 1, + "efecto": "Comida" + }, + { + "x": 1, + "y": 0, + "esCamino": true, + "ordenRecorrido": 3, + "efecto": null + }, + { + "x": 2, + "y": 0, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 3, + "y": 0, + "esCamino": true, + "ordenRecorrido": 2, + "efecto": "Comida" + }, + { + "x": 4, + "y": 0, + "esCamino": true, + "ordenRecorrido": 4, + "efecto": null + }, + { + "x": 0, + "y": 1, + "esCamino": true, + "ordenRecorrido": 5, + "efecto": "Bacanal" + }, + { + "x": 1, + "y": 1, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 2, + "y": 1, + "esCamino": true, + "ordenRecorrido": 6, + "efecto": null + }, + { + "x": 3, + "y": 1, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 4, + "y": 1, + "esCamino": true, + "ordenRecorrido": 7, + "efecto": "Fiera" + }, + { + "x": 0, + "y": 2, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 1, + "y": 2, + "esCamino": true, + "ordenRecorrido": 8, + "efecto": null + }, + { + "x": 2, + "y": 2, + "esCamino": true, + "ordenRecorrido": 9, + "efecto": "Equipamiento" + }, + { + "x": 3, + "y": 2, + "esCamino": true, + "ordenRecorrido": 10, + "efecto": null + }, + { + "x": 4, + "y": 2, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 0, + "y": 3, + "esCamino": true, + "ordenRecorrido": 11, + "efecto": "Equipamiento" + }, + { + "x": 1, + "y": 3, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 2, + "y": 3, + "esCamino": true, + "ordenRecorrido": 12, + "efecto": null + }, + { + "x": 3, + "y": 3, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 4, + "y": 3, + "esCamino": true, + "ordenRecorrido": 13, + "efecto": null + }, + { + "x": 0, + "y": 4, + "esCamino": true, + "ordenRecorrido": 14, + "efecto": null + }, + { + "x": 1, + "y": 4, + "esCamino": true, + "ordenRecorrido": 15, + "efecto": null + }, + { + "x": 2, + "y": 4, + "esCamino": false, + "ordenRecorrido": null, + "efecto": null + }, + { + "x": 3, + "y": 4, + "esCamino": true, + "ordenRecorrido": 16, + "efecto": null + }, + { + "x": 4, + "y": 4, + "esCamino": true, + "ordenRecorrido": 17, + "efecto": null + } +] \ No newline at end of file diff --git a/src/main/java/edu/fiuba/algo3/App.java b/src/main/java/edu/fiuba/algo3/App.java index 08fd172..fd219bf 100644 --- a/src/main/java/edu/fiuba/algo3/App.java +++ b/src/main/java/edu/fiuba/algo3/App.java @@ -11,6 +11,10 @@ */ public class App extends Application { + public static void main(String[] args) { + launch(); + } + @Override public void start(Stage stage) { var javaVersion = SystemInfo.javaVersion(); @@ -22,9 +26,5 @@ public void start(Stage stage) { stage.show(); } - public static void main(String[] args) { - launch(); - } - } \ No newline at end of file diff --git a/src/main/java/edu/fiuba/algo3/Message.java b/src/main/java/edu/fiuba/algo3/Message.java index 25a495b..68d1fff 100644 --- a/src/main/java/edu/fiuba/algo3/Message.java +++ b/src/main/java/edu/fiuba/algo3/Message.java @@ -1,7 +1,5 @@ package edu.fiuba.algo3; -import edu.fiuba.algo3.Localize; - public class Message extends Localize { public Message(String esContent, String usContent) { diff --git a/src/main/java/edu/fiuba/algo3/modelo/AlgoRoma.java b/src/main/java/edu/fiuba/algo3/modelo/AlgoRoma.java index 05a0762..fbf3d88 100644 --- a/src/main/java/edu/fiuba/algo3/modelo/AlgoRoma.java +++ b/src/main/java/edu/fiuba/algo3/modelo/AlgoRoma.java @@ -3,8 +3,8 @@ import java.util.ArrayList; public class AlgoRoma { - private final Turnos turnos; final ArrayList gladiadores; + private final Turnos turnos; public AlgoRoma(ArrayList gladiadores) { turnos = new Turnos(); diff --git a/src/main/java/edu/fiuba/algo3/modelo/Dado.java b/src/main/java/edu/fiuba/algo3/modelo/Dado.java index de99bf8..b20f5af 100644 --- a/src/main/java/edu/fiuba/algo3/modelo/Dado.java +++ b/src/main/java/edu/fiuba/algo3/modelo/Dado.java @@ -5,7 +5,7 @@ public class Dado { // static hace que sea un método de clase, es decir que puedas usarlo sin instanciar la clase - public static int tirar(){ + public static int tirar() { return new Random().nextInt(5) + 1; } } diff --git a/src/main/java/edu/fiuba/algo3/modelo/estado/Sano.java b/src/main/java/edu/fiuba/algo3/modelo/estado/Sano.java index 7d2f4dc..2781495 100644 --- a/src/main/java/edu/fiuba/algo3/modelo/estado/Sano.java +++ b/src/main/java/edu/fiuba/algo3/modelo/estado/Sano.java @@ -2,7 +2,7 @@ import edu.fiuba.algo3.modelo.Gladiador; -public class Sano implements Estado{ +public class Sano implements Estado { @Override public void avanzar(Gladiador gladiador, int cantidadCasillas) { gladiador.mover(cantidadCasillas); diff --git a/src/main/java/edu/fiuba/algo3/modelo/seniority/Novato.java b/src/main/java/edu/fiuba/algo3/modelo/seniority/Novato.java index 3cb2520..6e98431 100644 --- a/src/main/java/edu/fiuba/algo3/modelo/seniority/Novato.java +++ b/src/main/java/edu/fiuba/algo3/modelo/seniority/Novato.java @@ -6,7 +6,7 @@ public class Novato implements Seniority { @Override public Seniority actualizarPuntos(Energia energia, int turnosJugados) { energia.sumarPuntos(0); - if (turnosJugados == 8){ + if (turnosJugados == 8) { return new SemiSenior(); } return this;