bugfix in Rack and LaticeApplicationWindow
parent
122756df94
commit
b8bf1ab8a8
|
@ -35,6 +35,8 @@ import latice.model.Tile;
|
|||
|
||||
public class LaticeApplicationWindow extends Application{
|
||||
|
||||
javafx.scene.paint.Color realColor = new javafx.scene.paint.Color(0, 0, 0, 0);
|
||||
|
||||
Image image = new Image("laticePlateau.png");
|
||||
ImageView imageView = new ImageView(image);
|
||||
|
||||
|
@ -42,11 +44,22 @@ public class LaticeApplicationWindow extends Application{
|
|||
Tile greenLeaf = new Tile(Color.GREEN, Shape.FEATHER);
|
||||
Tile redFlower = new Tile(Color.RED, Shape.FLOWER);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
Application.launch(args);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void start(Stage primaryStage) throws Exception {
|
||||
BorderPane root = new BorderPane();
|
||||
|
@ -81,21 +94,7 @@ public class LaticeApplicationWindow extends Application{
|
|||
|
||||
root.setCenter(pane);
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
//Deck
|
||||
ArrayList<Tile> listOfTile = new ArrayList<Tile>();
|
||||
|
||||
for (Color color : Color.values()) {
|
||||
for (Shape shape : Shape.values()) {
|
||||
Tile tile = new Tile(color, shape);
|
||||
System.out.println(color.getStringColor() + shape.getStringShape()+ ".png");
|
||||
|
||||
listOfTile.add(tile);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Deck deck = new Deck(listOfTile);
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------
|
||||
|
|
|
@ -46,13 +46,6 @@ public class Rack {
|
|||
|
||||
|
||||
|
||||
|
||||
public ArrayList<Tile> getListRackTile() {
|
||||
return listRackTile;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public HBox createImageTileOfRack() {
|
||||
Image image;
|
||||
ImageView imageView;
|
||||
|
@ -66,7 +59,7 @@ public class Rack {
|
|||
|
||||
tile = (this.getListRackTile()).get(index);
|
||||
|
||||
image = new Image(tile.getShape().getStringShape() + " " + tile.getColor().getStringColor()+ ".png");
|
||||
image = new Image(tile.getShape().getStringShape() + "_" + tile.getColor().getStringColor()+ ".png");
|
||||
imageView = new ImageView(image);
|
||||
|
||||
rack.getChildren().add(imageView);
|
||||
|
|
Loading…
Reference in New Issue