diff --git a/Piece/src/application/Piece.java b/Piece/src/application/Piece.java new file mode 100644 index 0000000..19e24b7 --- /dev/null +++ b/Piece/src/application/Piece.java @@ -0,0 +1,35 @@ +package application; +import javafx.application.Application; +import javafx.scene.Group; +import javafx.scene.Scene; +import javafx.scene.paint.Color; +import javafx.scene.shape.Polygon; +import javafx.stage.Stage; +public class Piece extends Application{ + + public void start(Stage primaryStage) throws Exception { + + Polygon piece1 = new Polygon(); + piece1.getPoints().addAll(new Double [] { + 0.0,0.0, + 200.0,0.0, + 200.0,200.0, + 100.0,200.0, + 100.0,100.0, + 0.0,100.0}); + + piece1.setFill(Color.LIMEGREEN); + piece1.setStroke(Color.BLACK); + + Group root = new Group(); + root.getChildren().addAll(piece1); + Scene scene = new Scene(root,490,450,Color.WHEAT); + primaryStage.setScene(scene); + primaryStage.setTitle("piece 1"); + primaryStage.show(); + } + + public static void main(String[] args) { + launch(args); + } +} \ No newline at end of file