Skip to content

Commit

Permalink
Finished project!
Browse files Browse the repository at this point in the history
  • Loading branch information
Eyal8 committed Jun 26, 2017
1 parent 4887e92 commit daeb42f
Show file tree
Hide file tree
Showing 32 changed files with 242 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .idea/cssdialects.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file added resources/Images/Al.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/Al.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/Bumpy.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/BumpyCharacter.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/Jasmine_with_rajah.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/abu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/background.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/bad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/bum.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/bumpy.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/flying.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/food.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/lamp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/sultan.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/Images/yagu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/music/AladdinCave.mp4
Binary file not shown.
Binary file not shown.
Binary file added resources/music/Help.mp3
Binary file not shown.
Binary file added savedMazes/bayush
Binary file not shown.
Binary file added savedMazes/hayush
Binary file not shown.
Binary file added savedMazes/mazeA
Binary file not shown.
2 changes: 1 addition & 1 deletion src/View/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public void start(Stage primaryStage) throws Exception{
s.setTitle("Intro");
s.setFullScreen(true);
s.show();
PauseTransition delay = new PauseTransition(Duration.seconds(17));
PauseTransition delay = new PauseTransition(Duration.seconds(1));
delay.setOnFinished( event -> {
s.close();
runMaze(primaryStage);
Expand Down
105 changes: 105 additions & 0 deletions src/View/MyView.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import View.MazeDisplayer?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>

<BorderPane onKeyPressed="#KeyPressed" onScroll="#zooming" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="View.View">
<left>
<VBox prefHeight="200.0" prefWidth="178.0" spacing="5.0" BorderPane.alignment="CENTER">
<children>
<GridPane prefWidth="309.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<Label text="Maze rows:" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<Label text="Maze columns:" GridPane.columnIndex="0" GridPane.rowIndex="1" />
<TextField fx:id="txtfld_rowsNum" disable="false" text="50" GridPane.columnIndex="1" GridPane.rowIndex="0" />
<TextField fx:id="txtfld_columnsNum" disable="false" text="50" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Button fx:id="solve_button" cancelButton="true" disable="true" onAction="#solveMaze" prefHeight="25.0" prefWidth="167.0" text="Solve Maze" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="3" />
<Label text="Char row:" GridPane.columnIndex="0" GridPane.rowIndex="4" />
<Label text="Char column:" GridPane.columnIndex="0" GridPane.rowIndex="5" />
<Label fx:id="char_rowPos" accessibleRole="TEXT" text="${controller.characterRow}" graphicTextGap="8.0" prefHeight="21.0" prefWidth="40.0" textAlignment="CENTER" underline="true" wrapText="true" GridPane.columnIndex="1" GridPane.rowIndex="4">
<font>
<Font name="AR DECODE" size="28.0" />
</font></Label>
<Label fx:id="char_colPos" prefHeight="21.0" prefWidth="40.0" text="${controller.characterColumn}" GridPane.columnIndex="1" GridPane.rowIndex="5" />
</GridPane>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
</left>
<bottom>
<HBox BorderPane.alignment="CENTER">
<children>
<Label text="Status bar" />
</children>
</HBox>
</bottom>
<top>
<VBox BorderPane.alignment="CENTER">
<children>
<MenuBar>
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem mnemonicParsing="false" onAction="#generateMaze" text="New" />
<MenuItem mnemonicParsing="false" onAction="#save" text="Save" />
<MenuItem mnemonicParsing="false" onAction="#load" text="Load" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Options">
<items>
<MenuItem mnemonicParsing="false" text="Properties" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Exit">
<items>
<MenuItem mnemonicParsing="false" onAction="#exit" text="Exit Game" />
</items></Menu>
<Menu mnemonicParsing="false" text="Help" />
<Menu mnemonicParsing="false" text="About">
<items>
<MenuItem mnemonicParsing="false" onAction="#aboutTheProgrammers" text="About the programmers" />
<MenuItem mnemonicParsing="false" onAction="#aboutTheAlgorithms" text="About the algorithms" />
</items></Menu>
</menus>
</MenuBar>
</children>
</VBox>
</top>
<center>
<Pane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" BorderPane.alignment="CENTER">
<children>
<MazeDisplayer fx:id="mazeDisplayer" height="600.0" imageFileNameCharacter="resources/Images/ben.jpg" imageFileNameWall="resources/Images/ben1.jpg" width="600.0" />
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Pane>
</center>
</BorderPane>
1 change: 1 addition & 0 deletions src/View/View.java
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,7 @@ public void mute()
mediaPlayer.pause();
mute = true;
}
mazeDisplayer.requestFocus();
}
}

Binary file added src/View/abu.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
28 changes: 28 additions & 0 deletions src/View/alert.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
.root{
-fx-background-image: url("ds-genie.jpg");
-fx-background-size: cover;
-fx-font-weight: bold;
-fx-font-size:120%
}
.alert *.label.content {
-fx-text-fill: white;
}

Button {
-fx-text-fill: cornflowerblue;
-fx-font-family: "Gisha";
-fx-font-weight: bold;
-fx-background-color: white;
-fx-effect: dropshadow( three-pass-box, yellow, 10.0, 0.0, 0.0, 0.0);
}

Button:hover{
-fx-background-color: -fx-shadow-highlight-color, -fx-outer-border, -fx-inner-border, -fx-body-color;
-fx-background-insets: 0 0 -1 0, 0, 1, 2;
-fx-background-radius: 3px, 3px, 2px, 1px;
-fx-padding: 0.333333em 0.666667em 0.333333em 0.666667em; /* 4 8 4 8 */
-fx-text-fill: -fx-text-base-color;
-fx-alignment: CENTER;
-fx-content-display: LEFT;
}

Binary file added src/View/back.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/View/ds-genie.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/View/genie_aladdin.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/View/jaf.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions src/View/sample.fxml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import View.MazeDisplayer?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.Menu?>
<?import javafx.scene.control.MenuBar?>
<?import javafx.scene.control.MenuItem?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.VBox?>

<BorderPane fx:id="board" onKeyPressed="#KeyPressed" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="View.View">
<left>
<VBox prefHeight="200.0" prefWidth="178.0" spacing="5.0" BorderPane.alignment="CENTER">
<children>
<GridPane prefWidth="309.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<Label text="Maze rows:" GridPane.columnIndex="0" GridPane.rowIndex="0" />
<Label text="Maze columns:" GridPane.columnIndex="0" GridPane.rowIndex="1" />
<TextField fx:id="txtfld_rowsNum" disable="false" onKeyPressed="#setRows" text="50" GridPane.columnIndex="1" GridPane.rowIndex="0" />
<TextField fx:id="txtfld_columnsNum" disable="false" onKeyPressed="#setCols" text="50" GridPane.columnIndex="1" GridPane.rowIndex="1" />
<Button fx:id="solve_button" cancelButton="true" disable="true" onAction="#solveMaze" prefHeight="25.0" prefWidth="167.0" text="Solve Maze" GridPane.columnIndex="0" GridPane.columnSpan="2" GridPane.rowIndex="8" />
<Label text="Char row:" GridPane.columnIndex="0" GridPane.rowIndex="4" />
<Label text="Char column:" GridPane.columnIndex="0" GridPane.rowIndex="5" />
<Label fx:id="Char_row" prefHeight="17.0" prefWidth="19.0" text="${controller.characterRow}" GridPane.columnIndex="1" GridPane.rowIndex="4" />
<Label fx:id="Char_column" prefHeight="17.0" prefWidth="21.0" text="${controller.characterColumn}" GridPane.columnIndex="1" GridPane.rowIndex="5" />
</GridPane>
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
</left>
<bottom>
<HBox BorderPane.alignment="CENTER">
<children>
<Label text="Status bar" />
</children>
</HBox>
</bottom>
<top>
<VBox BorderPane.alignment="CENTER">
<children>
<MenuBar>
<menus>
<Menu mnemonicParsing="false" text="File">
<items>
<MenuItem fx:id="newFile" mnemonicParsing="false" onAction="#generateMaze" text="New" />
<MenuItem mnemonicParsing="false" onAction="#save" text="Save" />
<MenuItem mnemonicParsing="false" onAction="#load" text="Load" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Options">
<items>
<MenuItem mnemonicParsing="false" text="Properties" />
</items>
</Menu>
<Menu mnemonicParsing="false" text="Exit">
<items>
<MenuItem mnemonicParsing="false" onAction="#exit" text="Exit Game" />
</items></Menu>
<Menu mnemonicParsing="false" text="Help" />
<Menu mnemonicParsing="false" text="About">
<items>
<MenuItem mnemonicParsing="false" onAction="#aboutTheProgrammers" text="About the programmers" />
<MenuItem mnemonicParsing="false" onAction="#aboutTheAlgorithms" text="About the algorithms" />
</items></Menu>
</menus>
</MenuBar>
</children>
</VBox>
</top>
<center>
<Pane fx:id="mazePane" maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" BorderPane.alignment="CENTER">
<children>
<MazeDisplayer fx:id="mazeDisplayer" height="600.0" imageFileNameCharacter="resources/Images/ben.jpg" imageFileNameWall="resources/Images/ben1.jpg" imageFileNameGoal="resources/Images/caramel.jpg" imageFileNameSolve="resources/Images/cream.jpg" onScroll="#zooming" width="600.0" />
</children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</Pane>
</center>
</BorderPane>

0 comments on commit daeb42f

Please sign in to comment.