IQ PUZZLER FINAL VERSION

By downloading this source code and providing the javafx and sqlite libraries you can run the game.
diff --git a/.DS_Store b/.DS_Store
index c4dded4..9a10e61 100644
--- a/.DS_Store
+++ b/.DS_Store
Binary files differ
diff --git a/images/.DS_Store b/images/.DS_Store
new file mode 100644
index 0000000..becd9b0
--- /dev/null
+++ b/images/.DS_Store
Binary files differ
diff --git a/images/LastBoard.png b/images/LastBoard.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/boardLast.png b/images/boardLast.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/boardpic1.png b/images/boardpic1.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/emptySquare.png b/images/emptySquare.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/gift.png b/images/gift.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/hammer.png b/images/hammer.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/hammer20.png b/images/hammer20.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/ice.png b/images/ice.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/ice2.png b/images/ice2.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/ice3.png b/images/ice3.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/k-november-brain-games.jpg b/images/k-november-brain-games.jpg
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/lastBoardVersion.png b/images/lastBoardVersion.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/loadgame/.DS_Store b/images/loadgame/.DS_Store
new file mode 100644
index 0000000..8b87839
--- /dev/null
+++ b/images/loadgame/.DS_Store
Binary files differ
diff --git a/images/loadgame/levelEight.png b/images/loadgame/levelEight.png
new file mode 100644
index 0000000..9718466
--- /dev/null
+++ b/images/loadgame/levelEight.png
Binary files differ
diff --git a/images/loadgame/levelEightU.png b/images/loadgame/levelEightU.png
new file mode 100644
index 0000000..1a8c1db
--- /dev/null
+++ b/images/loadgame/levelEightU.png
Binary files differ
diff --git a/images/loadgame/levelFive.png b/images/loadgame/levelFive.png
new file mode 100644
index 0000000..4c22d7b
--- /dev/null
+++ b/images/loadgame/levelFive.png
Binary files differ
diff --git a/images/loadgame/levelFiveU.png b/images/loadgame/levelFiveU.png
new file mode 100644
index 0000000..ad0c8f9
--- /dev/null
+++ b/images/loadgame/levelFiveU.png
Binary files differ
diff --git a/images/loadgame/levelFour.png b/images/loadgame/levelFour.png
new file mode 100644
index 0000000..96358c9
--- /dev/null
+++ b/images/loadgame/levelFour.png
Binary files differ
diff --git a/images/loadgame/levelFourU.png b/images/loadgame/levelFourU.png
new file mode 100644
index 0000000..9a9acad
--- /dev/null
+++ b/images/loadgame/levelFourU.png
Binary files differ
diff --git a/images/loadgame/levelNine.png b/images/loadgame/levelNine.png
new file mode 100644
index 0000000..a1ba7e3
--- /dev/null
+++ b/images/loadgame/levelNine.png
Binary files differ
diff --git a/images/loadgame/levelNineU.png b/images/loadgame/levelNineU.png
new file mode 100644
index 0000000..1264284
--- /dev/null
+++ b/images/loadgame/levelNineU.png
Binary files differ
diff --git a/images/loadgame/levelOne.png b/images/loadgame/levelOne.png
new file mode 100644
index 0000000..9000ddd
--- /dev/null
+++ b/images/loadgame/levelOne.png
Binary files differ
diff --git a/images/loadgame/levelSeven.png b/images/loadgame/levelSeven.png
new file mode 100644
index 0000000..d640be5
--- /dev/null
+++ b/images/loadgame/levelSeven.png
Binary files differ
diff --git a/images/loadgame/levelSix.png b/images/loadgame/levelSix.png
new file mode 100644
index 0000000..aa352fb
--- /dev/null
+++ b/images/loadgame/levelSix.png
Binary files differ
diff --git a/images/loadgame/levelSixU.png b/images/loadgame/levelSixU.png
new file mode 100644
index 0000000..e572715
--- /dev/null
+++ b/images/loadgame/levelSixU.png
Binary files differ
diff --git a/images/loadgame/levelTen.png b/images/loadgame/levelTen.png
new file mode 100644
index 0000000..935c831
--- /dev/null
+++ b/images/loadgame/levelTen.png
Binary files differ
diff --git a/images/loadgame/levelTenU.png b/images/loadgame/levelTenU.png
new file mode 100644
index 0000000..322f5b7
--- /dev/null
+++ b/images/loadgame/levelTenU.png
Binary files differ
diff --git a/images/loadgame/levelThree.png b/images/loadgame/levelThree.png
new file mode 100644
index 0000000..8b519c1
--- /dev/null
+++ b/images/loadgame/levelThree.png
Binary files differ
diff --git a/images/loadgame/levelThreeU.png b/images/loadgame/levelThreeU.png
new file mode 100644
index 0000000..212327f
--- /dev/null
+++ b/images/loadgame/levelThreeU.png
Binary files differ
diff --git a/images/loadgame/levelTwo.png b/images/loadgame/levelTwo.png
new file mode 100644
index 0000000..98fa45d
--- /dev/null
+++ b/images/loadgame/levelTwo.png
Binary files differ
diff --git a/images/loadgame/levelTwoU.png b/images/loadgame/levelTwoU.png
new file mode 100644
index 0000000..ab60cb8
--- /dev/null
+++ b/images/loadgame/levelTwoU.png
Binary files differ
diff --git a/images/loadgame/levenSevenU.png b/images/loadgame/levenSevenU.png
new file mode 100644
index 0000000..7b1e74a
--- /dev/null
+++ b/images/loadgame/levenSevenU.png
Binary files differ
diff --git a/images/menu/.DS_Store b/images/menu/.DS_Store
new file mode 100644
index 0000000..f56051e
--- /dev/null
+++ b/images/menu/.DS_Store
Binary files differ
diff --git a/images/menu/gameOverStar.png b/images/menu/gameOverStar.png
new file mode 100644
index 0000000..aa39c73
--- /dev/null
+++ b/images/menu/gameOverStar.png
Binary files differ
diff --git a/images/menu/gameover.png b/images/menu/gameover.png
new file mode 100644
index 0000000..bd1227d
--- /dev/null
+++ b/images/menu/gameover.png
Binary files differ
diff --git a/images/menu/pauseButton.png b/images/menu/pauseButton.png
new file mode 100644
index 0000000..901f3a3
--- /dev/null
+++ b/images/menu/pauseButton.png
Binary files differ
diff --git a/images/p1.png b/images/p1.png
old mode 100644
new mode 100755
index 6ff4141..8aaec97
--- a/images/p1.png
+++ b/images/p1.png
Binary files differ
diff --git a/images/p10.png b/images/p10.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/p10Version2.png b/images/p10Version2.png
new file mode 100755
index 0000000..7f293e6
--- /dev/null
+++ b/images/p10Version2.png
Binary files differ
diff --git a/images/p11.png b/images/p11.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/p12.png b/images/p12.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/p2.png b/images/p2.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/p3Version2.png b/images/p3Version2.png
new file mode 100644
index 0000000..26f920f
--- /dev/null
+++ b/images/p3Version2.png
Binary files differ
diff --git a/images/p5.png b/images/p5.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/images/p6Version2.png b/images/p6Version2.png
new file mode 100644
index 0000000..4902494
--- /dev/null
+++ b/images/p6Version2.png
Binary files differ
diff --git a/images/p7.png b/images/p7.png
old mode 100644
new mode 100755
Binary files differ
diff --git a/out/.DS_Store b/out/.DS_Store
new file mode 100644
index 0000000..a1c437e
--- /dev/null
+++ b/out/.DS_Store
Binary files differ
diff --git a/out/production/.DS_Store b/out/production/.DS_Store
new file mode 100644
index 0000000..204e584
--- /dev/null
+++ b/out/production/.DS_Store
Binary files differ
diff --git a/out/production/IQPuzzlerPro/.DS_Store b/out/production/IQPuzzlerPro/.DS_Store
new file mode 100644
index 0000000..fd4b8e2
--- /dev/null
+++ b/out/production/IQPuzzlerPro/.DS_Store
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionController$1.class b/out/production/IQPuzzlerPro/sample/AdditionController$1.class
new file mode 100644
index 0000000..75d16d9
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionController$1.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionController$2.class b/out/production/IQPuzzlerPro/sample/AdditionController$2.class
new file mode 100644
index 0000000..455cd00
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionController$2.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionController$3.class b/out/production/IQPuzzlerPro/sample/AdditionController$3.class
new file mode 100644
index 0000000..1fe3893
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionController$3.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/AdditionController.class b/out/production/IQPuzzlerPro/sample/AdditionController.class
similarity index 87%
rename from out/production/Version2IQ/sample/AdditionController.class
rename to out/production/IQPuzzlerPro/sample/AdditionController.class
index 30c9698..dc107bf 100644
--- a/out/production/Version2IQ/sample/AdditionController.class
+++ b/out/production/IQPuzzlerPro/sample/AdditionController.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionModel.class b/out/production/IQPuzzlerPro/sample/AdditionModel.class
new file mode 100644
index 0000000..13460bf
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionModel.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView$1.class b/out/production/IQPuzzlerPro/sample/AdditionView$1.class
new file mode 100644
index 0000000..114299b
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView$1.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView$2.class b/out/production/IQPuzzlerPro/sample/AdditionView$2.class
new file mode 100644
index 0000000..2ee97e1
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView$2.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView$3.class b/out/production/IQPuzzlerPro/sample/AdditionView$3.class
new file mode 100644
index 0000000..6f16c91
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView$3.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView$4.class b/out/production/IQPuzzlerPro/sample/AdditionView$4.class
new file mode 100644
index 0000000..50a5ba1
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView$4.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView$5.class b/out/production/IQPuzzlerPro/sample/AdditionView$5.class
new file mode 100644
index 0000000..33e4ccc
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView$5.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView$6.class b/out/production/IQPuzzlerPro/sample/AdditionView$6.class
new file mode 100644
index 0000000..daddbf2
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView$6.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView$7.class b/out/production/IQPuzzlerPro/sample/AdditionView$7.class
new file mode 100644
index 0000000..e77c0a7
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView$7.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/AdditionView.class b/out/production/IQPuzzlerPro/sample/AdditionView.class
new file mode 100644
index 0000000..fbeee4b
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/AdditionView.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/Board.class b/out/production/IQPuzzlerPro/sample/Board.class
new file mode 100644
index 0000000..7194f2f
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/Board.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/ConnectionManager.class b/out/production/IQPuzzlerPro/sample/ConnectionManager.class
new file mode 100644
index 0000000..9b422c0
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/ConnectionManager.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/Controller.class b/out/production/IQPuzzlerPro/sample/Controller.class
similarity index 100%
rename from out/production/Version2IQ/sample/Controller.class
rename to out/production/IQPuzzlerPro/sample/Controller.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/DatabaseManager.class b/out/production/IQPuzzlerPro/sample/DatabaseManager.class
new file mode 100644
index 0000000..5b31c56
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/DatabaseManager.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/Game.class b/out/production/IQPuzzlerPro/sample/Game.class
new file mode 100644
index 0000000..b2c4b71
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/Game.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/GameOverScreen.class b/out/production/IQPuzzlerPro/sample/GameOverScreen.class
new file mode 100644
index 0000000..6348e33
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/GameOverScreen.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/GameOverScreen.fxml b/out/production/IQPuzzlerPro/sample/GameOverScreen.fxml
new file mode 100644
index 0000000..dcfe1a8
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/GameOverScreen.fxml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+
+<AnchorPane prefHeight="286.0" prefWidth="442.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.GameOverScreen">
+    <children>
+        <ImageView fitHeight="451.0" fitWidth="621.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/FinishScreen.png" />
+            </image>
+        </ImageView>
+        <ImageView fitHeight="84.0" fitWidth="384.0" layoutX="129.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/Ribbon.png" />
+            </image>
+        </ImageView>
+        <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="221.0" layoutY="52.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/gameover.png" />
+            </image>
+        </ImageView>
+        <ImageView fitHeight="160.0" fitWidth="284.0" layoutX="232.0" layoutY="115.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/gameOverStar.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="replayView" fitHeight="90.0" fitWidth="125.0" layoutX="345.0" layoutY="277.0" onMousePressed="#replayButtonHandle" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/DoneButton.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="exitView" fitHeight="90.0" fitWidth="125.0" layoutX="208.0" layoutY="277.0" onMousePressed="#exitButtonHandle" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/ReplayButton.png" />
+            </image>
+        </ImageView>
+        <Label layoutX="368.0" layoutY="367.0" text="Replay" />
+        <Label layoutX="240.0" layoutY="367.0" text="Exit" />
+    </children>
+</AnchorPane>
diff --git a/out/production/IQPuzzlerPro/sample/LeaderBoard.fxml b/out/production/IQPuzzlerPro/sample/LeaderBoard.fxml
new file mode 100755
index 0000000..d8522fb
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/LeaderBoard.fxml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+<?import javafx.scene.text.Font?>
+
+<AnchorPane maxHeight="600.0" maxWidth="600.0" minHeight="600.0" minWidth="600.0" prefHeight="600.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.LeaderBoardController">
+   <children>
+      <ImageView fitHeight="584.0" fitWidth="681.0" layoutX="-81.0" pickOnBounds="true" preserveRatio="true">
+         <image>
+            <Image url="file:images/menu/snowy.png" />
+         </image>
+      </ImageView>
+      <Label layoutX="159.0" layoutY="110.0" text="1." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label layoutX="155.0" layoutY="176.0" text="2." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label layoutX="155.0" layoutY="245.0" text="3." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label fx:id="firstUsername" layoutX="218.0" layoutY="143.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label layoutX="218.0" layoutY="93.0" prefHeight="22.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="USERNAME" textFill="WHITE">
+         <font>
+            <Font size="17.0" />
+         </font>
+      </Label>
+      <Label layoutX="384.0" layoutY="93.0" style="-fx-background-color: FFA500;" text="SCORE" textFill="WHITE">
+         <font>
+            <Font size="17.0" />
+         </font>
+      </Label>
+      <Label layoutX="155.0" layoutY="316.0" text="4." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label fx:id="firstScore" layoutX="380.0" layoutY="143.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="secondUsername" layoutX="218.0" layoutY="202.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="secondScore" layoutX="380.0" layoutY="202.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="thirdUsername" layoutX="218.0" layoutY="265.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="thirdScore" layoutX="380.0" layoutY="265.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="fourthUsername" layoutX="218.0" layoutY="336.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="fourthScore" layoutX="380.0" layoutY="336.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <ImageView fx:id="backView" fitHeight="66.0" fitWidth="65.0" layoutX="503.0" layoutY="14.0" onMouseClicked="#backButtonHandle" pickOnBounds="true" preserveRatio="true" rotate="45.0">
+         <image>
+            <Image url="file:images/menu/Back.png" />
+         </image>
+      </ImageView>
+   </children>
+</AnchorPane>
diff --git a/out/production/IQPuzzlerPro/sample/LeaderBoardController.class b/out/production/IQPuzzlerPro/sample/LeaderBoardController.class
new file mode 100644
index 0000000..a3f22b4
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/LeaderBoardController.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/Level.class b/out/production/IQPuzzlerPro/sample/Level.class
new file mode 100644
index 0000000..f6326c6
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/Level.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/LoadGame.fxml b/out/production/IQPuzzlerPro/sample/LoadGame.fxml
new file mode 100755
index 0000000..49d92c1
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/LoadGame.fxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Button?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+
+<AnchorPane maxHeight="600.0" maxWidth="600.0" minHeight="600.0" minWidth="600.0" prefHeight="600.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.LoadGameController">
+    <children>
+        <ImageView fx:id="backView" fitHeight="752.0" fitWidth="814.0" layoutX="-214.0" layoutY="-5.0" onMouseMoved="#refreshLevels" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/snowy.png" />
+            </image>
+        </ImageView>
+        <Button fx:id="backButton" layoutX="500.0" layoutY="28.0" mnemonicParsing="false" onAction="#backButtonHandle" prefHeight="31.0" prefWidth="73.0" text="Back" />
+        <ImageView fx:id="levelOneButton" fitHeight="79.0" fitWidth="73.0" layoutX="120.0" layoutY="103.0" onMouseClicked="#levelOneClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelOne.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelTwoButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="95.0" onMouseClicked="#levelTwoClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelTwoU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelThreeButton" fitHeight="98.0" fitWidth="73.0" layoutX="386.0" layoutY="95.0" onMouseClicked="#levelThreeClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelThreeU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelFiveButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="213.0" onMouseClicked="#levelFiveClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelFiveU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelEightButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="346.0" onMouseClicked="#levelEightClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelEightU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelSixButton" fitHeight="87.0" fitWidth="84.0" layoutX="386.0" layoutY="213.0" onMouseClicked="#levelSixClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelSixU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelNineButton" fitHeight="87.0" fitWidth="84.0" layoutX="386.0" layoutY="346.0" onMouseClicked="#levelNineClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelNineU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelSevenButton" fitHeight="87.0" fitWidth="84.0" layoutX="120.0" layoutY="346.0" onMouseClicked="#levelSevenClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levenSevenU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelFourButton" fitHeight="87.0" fitWidth="84.0" layoutX="120.0" layoutY="213.0" onMouseClicked="#levelFourClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelFourU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelTenButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="463.0" onMouseClicked="#levelTenClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelTenU.png" />
+            </image>
+        </ImageView>
+    </children>
+</AnchorPane>
diff --git a/out/production/IQPuzzlerPro/sample/LoadGameController.class b/out/production/IQPuzzlerPro/sample/LoadGameController.class
new file mode 100644
index 0000000..e5628c9
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/LoadGameController.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/Main.class b/out/production/IQPuzzlerPro/sample/Main.class
similarity index 79%
rename from out/production/Version2IQ/sample/Main.class
rename to out/production/IQPuzzlerPro/sample/Main.class
index 4446460..c0b534d 100644
--- a/out/production/Version2IQ/sample/Main.class
+++ b/out/production/IQPuzzlerPro/sample/Main.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/NewGame.fxml b/out/production/IQPuzzlerPro/sample/NewGame.fxml
old mode 100644
new mode 100755
similarity index 70%
rename from out/production/Version2IQ/sample/NewGame.fxml
rename to out/production/IQPuzzlerPro/sample/NewGame.fxml
index c1b7fc1..eb09aca
--- a/out/production/Version2IQ/sample/NewGame.fxml
+++ b/out/production/IQPuzzlerPro/sample/NewGame.fxml
@@ -8,32 +8,32 @@
    <children>
       <ImageView fitHeight="600.0" fitWidth="859.0" layoutX="-147.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/snowy.png" />
+            <Image url="file:images/menu/snowy.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="622.0" fitWidth="460.0" layoutX="57.0" layoutY="59.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Menu_Base.png" />
+            <Image url="file:images/menu/Menu_Base.png" />
          </image>
       </ImageView>
       <ImageView fx:id="twoD" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="274.0" onMousePressed="#twoDHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/2DGame.png" />
+            <Image url="file:images/menu/2DGame.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="369.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/3DGame.png" />
+            <Image url="file:images/menu/3DGame.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="213.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/ChooseMode.png" />
+            <Image url="file:images/menu/ChooseMode.png" />
          </image>
       </ImageView>
       <ImageView fx:id="backImage" fitHeight="150.0" fitWidth="50.0" layoutX="492.0" layoutY="33.0" onMousePressed="#backButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Back.png" />
+            <Image url="file:images/menu/Back.png" />
          </image>
       </ImageView>
    </children>
diff --git a/out/production/Version2IQ/sample/NewGameController.class b/out/production/IQPuzzlerPro/sample/NewGameController.class
similarity index 93%
rename from out/production/Version2IQ/sample/NewGameController.class
rename to out/production/IQPuzzlerPro/sample/NewGameController.class
index 1e01bc8..f9bdb5f 100644
--- a/out/production/Version2IQ/sample/NewGameController.class
+++ b/out/production/IQPuzzlerPro/sample/NewGameController.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/PauseAlertBox.class b/out/production/IQPuzzlerPro/sample/PauseAlertBox.class
new file mode 100644
index 0000000..2e270b9
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/PauseAlertBox.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/PauseAlertBox.fxml b/out/production/IQPuzzlerPro/sample/PauseAlertBox.fxml
old mode 100644
new mode 100755
similarity index 65%
rename from out/production/Version2IQ/sample/PauseAlertBox.fxml
rename to out/production/IQPuzzlerPro/sample/PauseAlertBox.fxml
index 8a3c2c0..48ef4f9
--- a/out/production/Version2IQ/sample/PauseAlertBox.fxml
+++ b/out/production/IQPuzzlerPro/sample/PauseAlertBox.fxml
@@ -9,32 +9,32 @@
    <children>
       <ImageView fitHeight="451.0" fitWidth="621.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/FinishScreen.png" />
+            <Image url="file:images/menu/FinishScreen.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="84.0" fitWidth="384.0" layoutX="129.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Ribbon.png" />
+            <Image url="file:images/menu/Ribbon.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="221.0" layoutY="52.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Congraculations.png" />
+            <Image url="file:images/menu/Congraculations.png" />
          </image>
       </ImageView>
-      <ImageView fitHeight="160.0" fitWidth="284.0" layoutX="179.0" layoutY="124.0" pickOnBounds="true" preserveRatio="true">
+      <ImageView fx:id="starView" fitHeight="160.0" fitWidth="284.0" layoutX="179.0" layoutY="124.0" onMouseMoved="#calculateScore" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/threeStar.png" />
+            <Image url="file:images/menu/OneStar.png" />
          </image>
       </ImageView>
       <ImageView fx:id="nextView" fitHeight="90.0" fitWidth="125.0" layoutX="348.0" layoutY="277.0" onMousePressed="#nextLevelButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/DoneButton.png" />
+            <Image url="file:images/menu/DoneButton.png" />
          </image>
       </ImageView>
       <ImageView fx:id="replayView" fitHeight="90.0" fitWidth="125.0" layoutX="208.0" layoutY="277.0" onMousePressed="#replayButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/ReplayButton.png" />
+            <Image url="file:images/menu/ReplayButton.png" />
          </image>
       </ImageView>
       <Label layoutX="377.0" layoutY="367.0" text="Next" />
diff --git a/out/production/IQPuzzlerPro/sample/Piece.class b/out/production/IQPuzzlerPro/sample/Piece.class
new file mode 100644
index 0000000..fcd9d02
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/Piece.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/TutorialScreen.fxml b/out/production/IQPuzzlerPro/sample/TutorialScreen.fxml
old mode 100644
new mode 100755
similarity index 100%
rename from out/production/Version2IQ/sample/TutorialScreen.fxml
rename to out/production/IQPuzzlerPro/sample/TutorialScreen.fxml
diff --git a/out/production/Version2IQ/sample/TutorialScreenController.class b/out/production/IQPuzzlerPro/sample/TutorialScreenController.class
similarity index 100%
rename from out/production/Version2IQ/sample/TutorialScreenController.class
rename to out/production/IQPuzzlerPro/sample/TutorialScreenController.class
Binary files differ
diff --git a/out/production/IQPuzzlerPro/sample/User.class b/out/production/IQPuzzlerPro/sample/User.class
new file mode 100644
index 0000000..4b34825
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/User.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/logInScreen.fxml b/out/production/IQPuzzlerPro/sample/logInScreen.fxml
old mode 100644
new mode 100755
similarity index 82%
rename from out/production/Version2IQ/sample/logInScreen.fxml
rename to out/production/IQPuzzlerPro/sample/logInScreen.fxml
index cbf1288..6c26b21
--- a/out/production/Version2IQ/sample/logInScreen.fxml
+++ b/out/production/IQPuzzlerPro/sample/logInScreen.fxml
@@ -14,24 +14,24 @@
     <children>
       <ImageView fitHeight="580.0" fitWidth="659.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/snowy.png" />
+            <Image url="file:images/menu/snowy.png" />
          </image>
       </ImageView>
         <TextField fx:id="userNameTextField" layoutX="193.0" layoutY="228.0" prefHeight="39.0" prefWidth="223.0" promptText="Username" />
       <PasswordField fx:id="passwordTextField" layoutX="193.0" layoutY="303.0" prefHeight="39.0" prefWidth="223.0" promptText="Password" />
       <ImageView fitHeight="145.0" fitWidth="292.0" layoutX="208.0" layoutY="78.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/IQPuzzler.png" />
+            <Image url="file:images/menu/IQPuzzler.png" />
          </image>
       </ImageView>
       <ImageView fx:id="loginView" fitHeight="39.0" fitWidth="109.0" layoutX="431.0" layoutY="228.0" onMousePressed="#signInButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/login.png" />
+            <Image url="file:images/menu/login.png" />
          </image>
       </ImageView>
       <ImageView fx:id="logupView" fitHeight="47.0" fitWidth="104.0" layoutX="431.0" layoutY="303.0" onMousePressed="#signUpButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/logup.png" />
+            <Image url="file:images/menu/logup.png" />
          </image>
       </ImageView>
     </children>
diff --git a/out/production/Version2IQ/sample/logInScreenController.class b/out/production/IQPuzzlerPro/sample/logInScreenController.class
similarity index 100%
rename from out/production/Version2IQ/sample/logInScreenController.class
rename to out/production/IQPuzzlerPro/sample/logInScreenController.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/mainMenu.fxml b/out/production/IQPuzzlerPro/sample/mainMenu.fxml
old mode 100644
new mode 100755
similarity index 72%
rename from out/production/Version2IQ/sample/mainMenu.fxml
rename to out/production/IQPuzzlerPro/sample/mainMenu.fxml
index cd796e7..679fddc
--- a/out/production/Version2IQ/sample/mainMenu.fxml
+++ b/out/production/IQPuzzlerPro/sample/mainMenu.fxml
@@ -9,38 +9,38 @@
    <children>
       <ImageView fitHeight="670.0" fitWidth="805.0" layoutX="-205.0" layoutY="-2.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/snowy.png" />
+            <Image url="file:images/menu/snowy.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="622.0" fitWidth="460.0" layoutX="57.0" layoutY="59.0" onMouseClicked="#newGameButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Menu_Base.png" />
+            <Image url="file:images/menu/Menu_Base.png" />
          </image>
       </ImageView>
       <Group layoutX="8.0" layoutY="-18.0" />
       <ImageView fx:id="PlayView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="176.0" onMousePressed="#newGameButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image> 
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/YellowFirst.png" />
+            <Image url="file:images/menu/YellowFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="tutorialView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="344.0" onMousePressed="#tutorialButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/BlueFirst.png" />
+            <Image url="file:images/menu/BlueFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="LoadView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="257.0" onMousePressed="#loadGameButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/GreenFirst.png" />
+            <Image url="file:images/menu/GreenFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="LeaderView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="429.0" onMousePressed="#leaderBoardButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/GreyFirst.png" />
+            <Image url="file:images/menu/GreyFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="backView" fitHeight="60.0" fitWidth="50.0" layoutX="506.0" layoutY="26.0" onKeyPressed="#backButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Back.png" />
+            <Image url="file:images/menu/Back.png" />
          </image>
       </ImageView>
    </children>
diff --git a/out/production/Version2IQ/sample/mainMenuController.class b/out/production/IQPuzzlerPro/sample/mainMenuController.class
similarity index 82%
rename from out/production/Version2IQ/sample/mainMenuController.class
rename to out/production/IQPuzzlerPro/sample/mainMenuController.class
index a2add20..db9222d 100644
--- a/out/production/Version2IQ/sample/mainMenuController.class
+++ b/out/production/IQPuzzlerPro/sample/mainMenuController.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/sample.fxml b/out/production/IQPuzzlerPro/sample/sample.fxml
old mode 100644
new mode 100755
similarity index 100%
rename from out/production/Version2IQ/sample/sample.fxml
rename to out/production/IQPuzzlerPro/sample/sample.fxml
diff --git a/out/production/IQPuzzlerPro/sample/signUp.fxml b/out/production/IQPuzzlerPro/sample/signUp.fxml
new file mode 100755
index 0000000..206530a
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/signUp.fxml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Button?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.control.TextField?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+<?import javafx.scene.text.Font?>
+
+<AnchorPane maxHeight="600.0" maxWidth="600.0" minHeight="600.0" prefHeight="600.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.signUpController">
+    <children>
+        <ImageView fitHeight="600.0" fitWidth="600.0" layoutX="3.0" layoutY="6.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/snowy.png" />
+            </image>
+        </ImageView>
+        <TextField fx:id="usernameField" layoutX="286.0" layoutY="209.0" prefHeight="41.0" prefWidth="198.0" />
+        <TextField fx:id="passwordField" layoutX="286.0" layoutY="280.0" prefHeight="41.0" prefWidth="198.0" />
+        <Button fx:id="signUpButton" layoutX="235.0" layoutY="379.0" mnemonicParsing="false" onAction="#signUpButtonHandle" prefHeight="50.0" prefWidth="122.0" text="Sign Up" textFill="#222121" />
+        <Button fx:id="backButton" layoutX="500.0" layoutY="28.0" mnemonicParsing="false" onAction="#backButtonHandle" prefHeight="31.0" prefWidth="73.0" text="Back" />
+        <Label alignment="CENTER" layoutX="212.0" layoutY="107.0" prefHeight="50.0" prefWidth="168.0" style="-fx-background-color: #FFA500;" text="Sign Up" textFill="#f8f7f7">
+            <font>
+                <Font size="36.0" />
+            </font>
+        </Label>
+        <Label alignment="CENTER" layoutX="129.0" layoutY="214.0" prefHeight="31.0" prefWidth="122.0" style="-fx-background-color: #FFA500;" text="Username" textFill="#f8f7f7">
+            <font>
+                <Font size="18.0" />
+            </font>
+        </Label>
+        <Label alignment="CENTER" layoutX="129.0" layoutY="285.0" prefHeight="31.0" prefWidth="122.0" style="-fx-background-color: #FFA500;" text="Password" textFill="#f8f7f7">
+            <font>
+                <Font size="18.0" />
+            </font>
+        </Label>
+    </children>
+</AnchorPane>
diff --git a/out/production/IQPuzzlerPro/sample/signUpController.class b/out/production/IQPuzzlerPro/sample/signUpController.class
new file mode 100644
index 0000000..0a9602a
--- /dev/null
+++ b/out/production/IQPuzzlerPro/sample/signUpController.class
Binary files differ
diff --git a/out/production/Version2IQ/sample/AdditionModel.class b/out/production/Version2IQ/sample/AdditionModel.class
deleted file mode 100644
index b354d66..0000000
--- a/out/production/Version2IQ/sample/AdditionModel.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/AdditionView.class b/out/production/Version2IQ/sample/AdditionView.class
deleted file mode 100644
index c552029..0000000
--- a/out/production/Version2IQ/sample/AdditionView.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/Board.class b/out/production/Version2IQ/sample/Board.class
deleted file mode 100644
index f458c0e..0000000
--- a/out/production/Version2IQ/sample/Board.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/Game.class b/out/production/Version2IQ/sample/Game.class
deleted file mode 100644
index 79c15fb..0000000
--- a/out/production/Version2IQ/sample/Game.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/GameField.class b/out/production/Version2IQ/sample/GameField.class
deleted file mode 100644
index 1c4d0e6..0000000
--- a/out/production/Version2IQ/sample/GameField.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/LeaderBoard.fxml b/out/production/Version2IQ/sample/LeaderBoard.fxml
deleted file mode 100644
index 0d63868..0000000
--- a/out/production/Version2IQ/sample/LeaderBoard.fxml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<?import java.lang.*?>
-<?import javafx.scene.control.*?>
-<?import javafx.scene.layout.*?>
-<?import javafx.scene.text.*?>
-<?import javafx.scene.control.Button?>
-<?import javafx.scene.control.Label?>
-<?import javafx.scene.control.TableColumn?>
-<?import javafx.scene.control.TableView?>
-<?import javafx.scene.control.TextField?>
-<?import javafx.scene.layout.AnchorPane?>
-<?import javafx.scene.text.Font?>
-
-<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.LeaderBoardController">
-   <children>
-      <Button fx:id="backButton" layoutX="500.0" layoutY="28.0" mnemonicParsing="false" onAction="#backButtonHandle" prefHeight="31.0" prefWidth="73.0" text="Back" />
-      <TableView fx:id="table" layoutX="74.0" layoutY="84.0" prefHeight="275.0" prefWidth="421.0">
-        <columns>
-          <TableColumn fx:id="nameCol" prefWidth="218.0" text="name" />
-          <TableColumn fx:id="scoreCol" minWidth="0.0" prefWidth="202.0" text="score" />
-        </columns>
-      </TableView>
-   </children>
-</AnchorPane>
diff --git a/out/production/Version2IQ/sample/LeaderBoardController.class b/out/production/Version2IQ/sample/LeaderBoardController.class
deleted file mode 100644
index 86089e2..0000000
--- a/out/production/Version2IQ/sample/LeaderBoardController.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/Level.class b/out/production/Version2IQ/sample/Level.class
deleted file mode 100644
index 24864ee..0000000
--- a/out/production/Version2IQ/sample/Level.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/LoadGame.fxml b/out/production/Version2IQ/sample/LoadGame.fxml
deleted file mode 100644
index 3c8fb65..0000000
--- a/out/production/Version2IQ/sample/LoadGame.fxml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<?import javafx.scene.text.*?>
-<?import java.lang.*?>
-<?import java.util.*?>
-<?import javafx.scene.*?>
-<?import javafx.scene.control.*?>
-<?import javafx.scene.layout.*?>
-
-<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.LoadGameController">
-    <children>
-        <Button fx:id="backButton" layoutX="500.0" layoutY="28.0" mnemonicParsing="false" onAction="#backButtonHandle" prefHeight="31.0" prefWidth="73.0" text="Back" />
-        <Text layoutX="246.0" layoutY="60.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Load Game " />
-      <TableView layoutX="132.0" layoutY="82.0" prefHeight="251.0" prefWidth="307.0">
-        <columns>
-          <TableColumn prefWidth="160.0" text="User Name " />
-          <TableColumn minWidth="0.0" prefWidth="146.0" text="Date" />
-        </columns>
-      </TableView>
-    </children>
-</AnchorPane>
diff --git a/out/production/Version2IQ/sample/LoadGameController.class b/out/production/Version2IQ/sample/LoadGameController.class
deleted file mode 100644
index a9c1a54..0000000
--- a/out/production/Version2IQ/sample/LoadGameController.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/PauseAlertBox.class b/out/production/Version2IQ/sample/PauseAlertBox.class
deleted file mode 100644
index a56724b..0000000
--- a/out/production/Version2IQ/sample/PauseAlertBox.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/Piece.class b/out/production/Version2IQ/sample/Piece.class
deleted file mode 100644
index 9a25aaa..0000000
--- a/out/production/Version2IQ/sample/Piece.class
+++ /dev/null
Binary files differ
diff --git a/out/production/Version2IQ/sample/signUp.fxml b/out/production/Version2IQ/sample/signUp.fxml
deleted file mode 100644
index 9e2055c..0000000
--- a/out/production/Version2IQ/sample/signUp.fxml
+++ /dev/null
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<?import javafx.scene.text.*?>
-<?import java.lang.*?>
-<?import javafx.scene.control.*?>
-<?import javafx.scene.layout.*?>
-<?import javafx.scene.control.Button?>
-<?import javafx.scene.control.Label?>
-<?import javafx.scene.control.TextField?>
-<?import javafx.scene.layout.AnchorPane?>
-
-<AnchorPane prefHeight="400.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.signUpController">
-   <children>
-      <TextField fx:id="usernameField" layoutX="209.0" layoutY="188.0" />
-      <TextField fx:id="passwordField" layoutX="209.0" layoutY="242.0" />
-      <Button fx:id="signUpButton" layoutX="255.0" layoutY="281.0" mnemonicParsing="false" onAction="#signUpButtonHandle" text="Sign Up" />
-      <Label layoutX="124.0" layoutY="247.0" text="Password" />
-      <Label layoutX="103.0" layoutY="193.0" text="Email Adress" />
-      <Button fx:id="backButton" layoutX="500.0" layoutY="28.0" mnemonicParsing="false" onAction="#backButtonHandle" prefHeight="31.0" prefWidth="73.0" text="Back" />
-      <Text layoutX="272.0" layoutY="64.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Sign Up" />
-   </children>
-</AnchorPane>
diff --git a/out/production/Version2IQ/sample/signUpController.class b/out/production/Version2IQ/sample/signUpController.class
deleted file mode 100644
index 8433734..0000000
--- a/out/production/Version2IQ/sample/signUpController.class
+++ /dev/null
Binary files differ
diff --git a/src/.DS_Store b/src/.DS_Store
index 0132e68..36d5e05 100644
--- a/src/.DS_Store
+++ b/src/.DS_Store
Binary files differ
diff --git a/src/AdditionController.java b/src/AdditionController.java
new file mode 100644
index 0000000..ff9ed44
--- /dev/null
+++ b/src/AdditionController.java
@@ -0,0 +1,397 @@
+package sample;
+
+import javafx.event.Event;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+
+public class AdditionController {
+
+    private final AdditionModel model ;
+
+    Piece selectedPiece;
+
+
+    public AdditionController(AdditionModel model) {
+        this.model = model;
+    }
+
+    javafx.event.EventHandler handler = new javafx.event.EventHandler() {
+        @Override
+        public void handle(Event event) {
+            try {
+                Parent root = FXMLLoader.load(getClass().getResource("mainMenu.fxml"));
+                Stage m = Main.getMainStage();
+                Scene t = new Scene(root);
+                m.setScene(t);
+                Main.setMainStage(m);
+                m.centerOnScreen();
+
+            } catch (IOException e1) {
+                e1.printStackTrace();
+            }
+        }};
+
+
+    javafx.event.EventHandler pressedHandler = new javafx.event.EventHandler() {
+        @Override
+        public void handle(Event event) {
+
+
+            if (event.getSource() == model.getGame().pieceOne.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceOne;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceOne.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceTwo.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceTwo;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceTwo.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceThree.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceThree;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceThree.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceThreeVersion2.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceThreeVersion2;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceThreeVersion2.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceFour.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceFour;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceFour.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() ==  model.getGame().pieceFive.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceFive;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceFive.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() ==  model.getGame().pieceSix.getCurrentImage()) {
+                selectedPiece =  model.getGame().pieceSix;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceSix.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() ==  model.getGame().pieceSixVersion2.getCurrentImage()) {
+                selectedPiece =  model.getGame().pieceSixVersion2;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceSixVersion2.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceSeven.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceSeven;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceSeven.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceEight.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceEight;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceEight.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceNine.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceNine;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceNine.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceTen.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceTen;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceTen.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() == model.getGame().pieceTenVersion2.getCurrentImage()) {
+                selectedPiece = model.getGame().pieceTenVersion2;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] == model.getGame().pieceTenVersion2.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+
+            else if (event.getSource() ==  model.getGame().pieceEleven.getCurrentImage()) {
+                selectedPiece =  model.getGame().pieceEleven;
+
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceEleven.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            } else if (event.getSource() ==  model.getGame().pieceTwelve.getCurrentImage()) {
+                selectedPiece =  model.getGame().pieceTwelve;
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceTwelve.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }else if (event.getSource() ==  model.getGame().pieceTwelve2.getCurrentImage()) {
+                selectedPiece =  model.getGame().pieceTwelve2;
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceTwelve2.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }else if (event.getSource() ==  model.getGame().pieceEleven2.getCurrentImage()) {
+                selectedPiece =  model.getGame().pieceEleven2;
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceEleven2.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }else if (event.getSource() ==  model.getGame().pieceTwo2.getCurrentImage()) {
+                selectedPiece =  model.getGame().pieceTwo2;
+                for (int i = 0; i < 5; i++) {
+                    for (int j = 0; j < 11; j++) {
+                        if (model.getBoard().boardMatrix[i][j] ==  model.getGame().pieceTwo2.getPieceId()) {
+                            model.getBoard().boardMatrix[i][j] = 0;
+                        }
+                    }
+                }
+            }
+        }};
+
+
+
+    //--------------------------------------------------------------------------------------------------
+
+    //MOUSE RELEASED EVENT HANDLER
+    //This code calculates the position of piece
+
+
+    javafx.event.EventHandler releaseHandler = new javafx.event.EventHandler() {
+        @Override
+        public void handle(Event event){
+/*
+            ArrayList<Piece> unUsuedPieces = model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getUnusedPieces();
+            for(int i = 0; i < unUsuedPieces.size(); i++){
+                if(event.getSource() == unUsuedPieces.get(i)) {
+                    if (model.getBoard().checkPieceBoundary(unUsuedPieces.get(i).getCurrentImage(), 40, 440)) {
+                        model.getBoard().putPiece(unUsuedPieces.get(i), model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+                    }
+                }
+            }
+            */
+
+            if(event.getSource() == model.getGame().pieceOne.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceOne.getCurrentImage(), 40, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceOne, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceTwo.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceTwo.getCurrentImage(), 40, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceTwo, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceThree.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceThree.getCurrentImage(), 40, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceThree, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceThreeVersion2.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceThreeVersion2.getCurrentImage(), 40, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceThreeVersion2, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceFour.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceFour.getCurrentImage(), 280, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceFour, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceFive.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceFive.getCurrentImage(), 280, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceFive, model.getXboardMatrix(), model.getYboardMatrix(), 280, 440);
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceSix.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceSix.getCurrentImage(), 570, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceSix, model.getXboardMatrix(), model.getYboardMatrix(), 570, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceSixVersion2.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceSixVersion2.getCurrentImage(), 570, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceSixVersion2, model.getXboardMatrix(), model.getYboardMatrix(), 570, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceSeven.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceSeven.getCurrentImage(), 570, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceSeven, model.getXboardMatrix(), model.getYboardMatrix(), 570, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceEight.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceEight.getCurrentImage(), 570, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceEight, model.getXboardMatrix(), model.getYboardMatrix(), 570, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceNine.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceNine.getCurrentImage(), 570, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceNine, model.getXboardMatrix(), model.getYboardMatrix(), 570, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceTen.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceTen.getCurrentImage(), 40, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceTen, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceTenVersion2.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceTenVersion2.getCurrentImage(), 40, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceTenVersion2, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceEleven.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary( model.getGame().pieceEleven.getCurrentImage(), 280, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceEleven, model.getXboardMatrix(), model.getYboardMatrix(), 280, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceTwelve.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceTwelve.getCurrentImage(), 570, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceTwelve, model.getXboardMatrix(), model.getYboardMatrix(), 570, 440);
+                }
+            }
+            if(event.getSource() == model.getGame().pieceTwo2.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceTwo2.getCurrentImage(), 40, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceTwo2, model.getXboardMatrix(), model.getYboardMatrix(), 40, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceEleven2.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary( model.getGame().pieceEleven2.getCurrentImage(), 280, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceEleven2, model.getXboardMatrix(), model.getYboardMatrix(), 280, 440);
+
+                }
+            }
+
+            if(event.getSource() == model.getGame().pieceTwelve2.getCurrentImage()) {
+                if (model.getBoard().checkPieceBoundary(model.getGame().pieceTwelve2.getCurrentImage(), 570, 440)) {
+                    model.getBoard().putPiece(model.getGame().pieceTwelve2, model.getXboardMatrix(), model.getYboardMatrix(), 570, 440);
+                }
+            }
+
+        }};
+
+
+
+    public Piece getSelectedPiece(){
+        return selectedPiece;
+    }
+
+
+}
\ No newline at end of file
diff --git a/src/AdditionModel.java b/src/AdditionModel.java
new file mode 100644
index 0000000..e8ce38f
--- /dev/null
+++ b/src/AdditionModel.java
@@ -0,0 +1,107 @@
+package sample;
+
+public class AdditionModel {
+
+    final int sceneWidth = 1500;
+    final int sceneHeight = 1000;
+
+    private double []xPositions = new double[9];
+    private double []yPositions = new double[9];
+
+    //----------------------------------------------------------------------------------------------------------------------
+
+    //BOARD MATRIXI INITIALIZE EDILIYOR VE BIR MATRIX XPOSITIONLARI TUTUYOR BIR MATRIX YPOSITIONLARI TUTUYOR
+    //BIR MATRIX TUM BOARD ENTRYLERININ BOS OLUP OLMADIGINI TUTUYOR
+    //Boardun constructorinda initialize edilece
+
+    private double [][]XboardMatrix = new double[5][11];
+    private double [][]YboardMatrix = new double[5][11];
+
+    //init x positions
+
+    private Board board;
+    private Game game;
+
+    private int levelTime;
+
+
+    public AdditionModel(){
+        game = Game.getInstance();
+        levelTime = game.twoDLevels[game.getCurrent2DLevel()].getTime();
+
+        board = new Board(game.twoDLevels[game.getCurrent2DLevel()].getLevelMatrix(), sceneWidth, sceneHeight);
+
+        xPositions[0] = 5;
+        xPositions[1] = 290;
+        xPositions[2] = 575;
+        xPositions[3] = 860;
+        xPositions[4] = 1145;
+        xPositions[5] = 5;
+        xPositions[6] = 5;
+        xPositions[7] = 775;
+        xPositions[8] = 775;
+
+        yPositions[0] = 450;
+        yPositions[1] = 450;
+        yPositions[2] = 450;
+        yPositions[3] = 450;
+        yPositions[4] = 450;
+        yPositions[5] = 0;
+        yPositions[6] = 285;
+        yPositions[7] = 0;
+        yPositions[8] = 285;
+
+
+        for(int i = 0; i < 5; i++) {
+            for(int j =0; j < 11; j++) {
+                XboardMatrix[i][j] = ((sceneWidth - board.getBoardWidth()) / 2)  + (70 * j);
+                YboardMatrix[i][j] = 70 * i;
+            }
+        }
+    }
+
+    public int getSceneWidth(){
+        return sceneWidth;
+    }
+
+    public int getSceneHeight(){
+        return sceneHeight;
+    }
+
+    public Board getBoard(){
+        return board;
+    }
+
+    public Game getGame(){
+        return game;
+    }
+
+    public double[] getxPositions() {
+        return xPositions;
+    }
+
+    public double[] getyPositions() {
+        return yPositions;
+    }
+
+    public double[][] getXboardMatrix() {
+        return XboardMatrix;
+    }
+
+    public double[][] getYboardMatrix() {
+        return YboardMatrix;
+    }
+
+    public int getLevelTime(){
+        return game.twoDLevels[game.getCurrent2DLevel()].getTime();
+    }
+
+    public void setElapsedTime(int time){ game.twoDLevels[game.getCurrent2DLevel()].setElapsedTime(time);}
+
+    public int getElapsedTime(){ return game.twoDLevels[game.getCurrent2DLevel()].getElapsedTime();}
+
+    public void incrementTime(){ game.twoDLevels[game.getCurrent2DLevel()].incrementElapsedTime();}
+
+}
+
+
diff --git a/src/AdditionView.java b/src/AdditionView.java
new file mode 100644
index 0000000..bccabe2
--- /dev/null
+++ b/src/AdditionView.java
@@ -0,0 +1,416 @@
+package sample;
+
+import javafx.application.Platform;
+import javafx.event.ActionEvent;
+import javafx.event.EventHandler;
+import javafx.fxml.FXMLLoader;
+import javafx.geometry.Insets;
+import javafx.scene.ImageCursor;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.control.Button;
+import javafx.scene.control.TextField;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.scene.input.KeyCode;
+import javafx.scene.input.KeyEvent;
+import javafx.scene.input.MouseEvent;
+import javafx.scene.layout.*;
+import javafx.stage.Stage;
+import jfxtras.labs.util.event.MouseControlUtil;
+
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Timer;
+import java.util.TimerTask;
+
+public class AdditionView {
+
+    private BorderPane backgroundPane;
+    private BorderPane menuPane;
+    private int timerPosition;
+    private int levelTime;
+    private int time;
+    int hammerClickCount;
+    int iceBreakClickCount;
+    boolean hammerButtonClicked;
+
+    private AdditionController controller;
+    private AdditionModel model ;
+
+    ImageView boardView;
+    Scene currentScene;
+
+    public AdditionView(AdditionController controller, AdditionModel model) {
+
+        this.controller = controller ;
+        this.model = model ;
+
+        createAndConfigurePane();
+
+        levelTime = 60;//model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getTime();
+        time = 0;
+
+        hammerClickCount = 0;
+        iceBreakClickCount = 0;
+        hammerButtonClicked = false;
+        currentScene = Main.getMainStage().getScene();
+    }
+
+    public Parent asParent() {
+        return backgroundPane ;
+    }
+
+    private void createAndConfigurePane() {
+
+        backgroundPane = new BorderPane();
+        menuPane = new BorderPane();
+        menuPane.setPadding(new Insets(10, 20 ,10 ,20));
+
+        menuPane.setMinSize(150,150);
+        menuPane.setMaxSize(150, 150);
+
+        Image pauseButton = new Image("file:images/menu/pauseButton.png");
+        ImageView pauseView = new ImageView(pauseButton);
+        pauseView.setLayoutX(200);
+        pauseView.setLayoutY(40);
+
+        pauseView.addEventHandler(MouseEvent.MOUSE_CLICKED, controller.handler);
+        menuPane.getChildren().add(pauseView);
+
+        //Hammer Logic
+        Button hammerButton = new Button();
+        hammerButton.setGraphic(new ImageView("file:images/hammer.png"));
+        //menuPane.getChildren().addAll(hammerButton);
+        menuPane.setTop(hammerButton);
+
+        hammerButton.setOnAction(new EventHandler<ActionEvent>() {
+            @Override public void handle(ActionEvent e) {
+                Image hammerImage = new Image("file:images/hammer.png");
+                ImageCursor cursor = new ImageCursor(hammerImage, 0, 0);
+                currentScene.setCursor(cursor);
+                hammerButtonClicked = true;
+            }
+        });
+
+        Pane pieceBox = new Pane();
+        pieceBox.setMinHeight(model.sceneHeight - menuPane.getHeight());
+        pieceBox.setMinWidth(model.sceneWidth);
+
+        Image timerImage = new Image("file:images/menu/progress.png");
+        ImageView timerView = new ImageView(timerImage);
+        Image lineImage = new Image("file:images/menu/theLine.png");
+        ImageView lineView = new ImageView(lineImage);
+
+        menuPane.getChildren().addAll(lineView);
+        menuPane.getChildren().addAll(timerView);
+
+        lineView.setLayoutY(60);
+
+        int timerStartingX = (model.getSceneWidth() - 660) / 2;
+
+        lineView.setLayoutX(timerStartingX);
+        timerView.setLayoutY(55);
+        timerView.setLayoutX(timerStartingX);
+        timerPosition = timerStartingX;
+
+        //TIMERS
+        Timer timer = new Timer();
+        Timer iceTimer = new Timer();
+        Timer giftTimer = new Timer();
+        Timer deleteGiftTimer = new Timer();
+
+        //GIFTS AND ICES
+        ArrayList<ImageView> iceBlocks = new ArrayList<>();
+        ArrayList<ImageView> gifts = new ArrayList<>();
+
+
+        TimerTask task = new TimerTask()
+        {
+            public void run()
+            {
+                model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].incrementElapsedTime();
+                timerView.setLayoutX(timerPosition += 2);
+
+                if(model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getElapsedTime() == 300){
+                    model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].setElapsedTime(310);
+                    timer.cancel();
+                }
+            }
+        };
+
+        int period = (int) 60 * 1000 / 300; //60 yerine levelTime gelicek
+
+        timer.scheduleAtFixedRate(task,100, period);
+
+        TimerTask giftTask = new TimerTask(){
+            @Override
+            public  void  run(){
+                Platform.runLater(() ->{
+                    ArrayList<Integer> emptyRowPositions = new ArrayList<>();
+                    ArrayList<Integer> emptyColumnPositions = new ArrayList<>();
+                    for(int i = 0; i < 5; i++){ //find empy positions
+                        for(int j = 0; j < 11; j++){
+                            if(model.getBoard().boardMatrix[i][j] == 0){
+                                emptyRowPositions.add(i);
+                                emptyColumnPositions.add(j);
+                            }
+                        }
+                    }
+                    int randomRow1, randomColumn;
+                    if(gifts.size() == 0){
+                        randomRow1 = (int)(Math.random() * emptyRowPositions.size());
+                        randomColumn = randomRow1;
+                        Image gift = new Image("file:images/gift.png");
+                        ImageView giftView = new ImageView(gift);
+                        giftView.setFitHeight(70);
+                        giftView.setFitWidth(70);
+                        pieceBox.getChildren().addAll(giftView);
+                        giftView.relocate(model.getXboardMatrix()[emptyRowPositions.get(randomRow1)][emptyColumnPositions.get(randomColumn)], model.getYboardMatrix()[emptyRowPositions.get(randomRow1)][emptyColumnPositions.get(randomColumn)]);
+                        gifts.add(giftView);
+                        model.getBoard().boardMatrix[emptyRowPositions.get(randomRow1)][emptyColumnPositions.get(randomColumn)] = -2;
+                    }
+                });
+            }
+        };
+
+        TimerTask deleteGiftTask = new TimerTask() {
+            @Override
+            public void run() {
+                Platform.runLater(()->{
+                    ArrayList<Integer> giftPositionRow = new ArrayList<Integer>();
+                    ArrayList<Integer> giftPositionColumn = new ArrayList<Integer>();
+                    for(int i = 0; i < 5; i++){
+                        for(int j = 0; j < 11; j++){
+                            if(model.getBoard().boardMatrix[i][j] == -2){
+                                giftPositionColumn.add(j);
+                                giftPositionRow.add(i);
+                            }
+                        }
+                    }
+                    if(gifts.isEmpty() == false){
+                        gifts.get(0).setImage(null);
+                        gifts.remove(0);
+                        model.getBoard().boardMatrix[giftPositionRow.get(0)][giftPositionColumn.get(0)] = 0;
+                    }
+
+                });
+            }
+        };
+
+
+        TimerTask iceTask = new TimerTask() {
+            @Override
+            public void run() {
+                Platform.runLater(() ->{
+                    ArrayList<Integer> emptyRowPositions = new ArrayList<>();
+                    ArrayList<Integer> emptColumnPositions = new ArrayList<>();
+                    for(int i = 0; i < 5; i++){ //find empy positions
+                        for(int j = 0; j < 11; j++){
+                            if(model.getBoard().boardMatrix[i][j] == 0){
+                                emptyRowPositions.add(i);
+                                emptColumnPositions.add(j);
+                            }
+                        }
+                    }
+                    //choose random empty positions
+                    int randomRow1, randomRow2, randomRow3, randomColumn1, randomColumn2, randomColumn3;
+                    if(emptyRowPositions.size() >= 3){
+                        do{
+                            randomRow1 = (int)(Math.random() * emptyRowPositions.size());
+                            randomRow2 = (int)(Math.random() * emptyRowPositions.size());
+                            randomRow3 = (int)(Math.random() * emptyRowPositions.size());
+                            if(randomRow1 != randomRow2 && randomRow1 != randomRow3 && randomRow2 != randomRow3){
+                                randomColumn1 = randomRow1;
+                                randomColumn2 = randomRow2;
+                                randomColumn3 = randomRow3;
+
+                                Image ice = new Image("file:images/ice.png");
+                                Image ice2 = new Image("file:images/ice2.png");
+                                Image ice3 = new Image("file:images/ice3.png");
+
+                                ImageView ice1View = new ImageView(ice);
+                                ImageView ice2View = new ImageView(ice2);
+                                ImageView ice3View = new ImageView(ice3);
+
+                                ice1View.setFitHeight(70);
+                                ice1View.setFitWidth(70);
+                                ice2View.setFitHeight(70);
+                                ice2View.setFitWidth(70);
+                                ice3View.setFitHeight(70);
+                                ice3View.setFitWidth(70);
+
+                                pieceBox.getChildren().add(ice1View);
+                                pieceBox.getChildren().add(ice2View);
+                                pieceBox.getChildren().add(ice3View);
+
+                                ice1View.relocate(model.getXboardMatrix()[emptyRowPositions.get(randomRow1)][emptColumnPositions.get(randomColumn1)], model.getYboardMatrix()[emptyRowPositions.get(randomRow1)][emptColumnPositions.get(randomColumn1)]);
+                                ice2View.relocate(model.getXboardMatrix()[emptyRowPositions.get(randomRow2)][emptColumnPositions.get(randomColumn2)], model.getYboardMatrix()[emptyRowPositions.get(randomRow2)][emptColumnPositions.get(randomColumn2)]);
+                                ice3View.relocate(model.getXboardMatrix()[emptyRowPositions.get(randomRow3)][emptColumnPositions.get(randomColumn3)], model.getYboardMatrix()[emptyRowPositions.get(randomRow3)][emptColumnPositions.get(randomColumn3)]);
+
+                                iceBlocks.add(ice1View);
+                                iceBlocks.add(ice2View);
+                                iceBlocks.add(ice3View);
+
+                                model.getBoard().boardMatrix[emptyRowPositions.get(randomRow1)][emptColumnPositions.get(randomColumn1)] = -1;
+                                model.getBoard().boardMatrix[emptyRowPositions.get(randomRow2)][emptColumnPositions.get(randomColumn2)] = -1;
+                                model.getBoard().boardMatrix[emptyRowPositions.get(randomRow3)][emptColumnPositions.get(randomColumn3)] = -1;
+
+                                System.out.println("first indexes" + randomRow1 +"," + randomColumn1 );
+                                System.out.println("second indexes" + randomRow2 +"," + randomColumn2 );
+                                System.out.println("third indexes" + randomRow3 +"," + randomColumn3 );
+                                System.out.println("size is: " + iceBlocks.size());
+                                break;
+                            }
+                        }while(randomRow1 != randomRow2 && randomRow1 != randomRow3 && randomRow2 != randomRow3);
+                    }
+                });
+            }
+        };
+
+        //TIMER JUSTIFICATIONS
+        iceTimer.scheduleAtFixedRate(iceTask, 300000, 8000);
+        giftTimer.scheduleAtFixedRate(giftTask, 6000, 7000);
+        deleteGiftTimer.scheduleAtFixedRate(deleteGiftTask,0,10000);
+
+        ImageView boardView = model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getBoardView();
+
+        ArrayList<Piece> unUsuedPieces = model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getUnusedPieces();
+        //System.out.println( model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getUnusedPieces().get(0).getPieceId());
+        ArrayList<ImageView> unUsedPiecesView = new ArrayList<ImageView>();
+        //model.getBoard().updateBoard();
+
+        //assign imageviews of pieces
+        for(int i = 0; i < unUsuedPieces.size(); i++){
+            unUsedPiecesView.add(i, unUsuedPieces.get(i).getCurrentImage());
+            unUsedPiecesView.get(i).relocate(model.getxPositions()[i], model.getyPositions()[i]);
+            pieceBox.getChildren().add(unUsedPiecesView.get(i));
+            MouseControlUtil.makeDraggable(unUsuedPieces.get(i).getCurrentImage());
+        }
+
+        pieceBox.getChildren().add(boardView);
+        boardView.setLayoutX((model.sceneWidth - model.getBoard().getBoardWidth()) / 2 );
+        boardView.setLayoutY(0);
+
+//--------------------------------------------------------------------------------------------------
+
+        backgroundPane.addEventFilter(KeyEvent.KEY_PRESSED, event->{
+            if (event.getCode() == KeyCode.R) {
+                controller.getSelectedPiece().getCurrentImage().setRotate(controller.getSelectedPiece().getCurrentImage().getRotate()+90);
+                controller.getSelectedPiece().rotateMatrixLeft();
+                controller.getSelectedPiece().getCurrentImage().setFitWidth(280);
+                controller.getSelectedPiece().getCurrentImage().setFitHeight(280);
+                controller.getSelectedPiece().incrementRotationCount();
+            }
+        });
+
+
+        //BUZLARI KIRMA
+         backgroundPane.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
+            @Override
+            public void handle(MouseEvent mouseEvent) {
+
+                if(model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].isTimeOver()){
+                    model.getGame().replay();
+                }
+
+                hammerClickCount++;
+                if(hammerButtonClicked){
+                    if(hammerClickCount % 2 == 0){
+                        Image hammerImage = new Image("file:images/hammer.png");
+                        ImageCursor cursor = new ImageCursor(hammerImage, 0, 0);
+                        //backgroundPane.setCursor(cursor);
+                    }
+
+                    else{
+                        Image hammerImage = new Image("file:images/hammer20.png");
+                        ImageCursor cursor = new ImageCursor(hammerImage, 0, 0);
+                        //backgroundPane.setCursor(cursor);
+                    }
+                }
+
+                double xClicked = mouseEvent.getX();
+                double yClicked = mouseEvent.getY() - 150;
+
+                double boardHeight = 350;
+                double boardWidth = 770;
+                double sceneWidth =  backgroundPane.getWidth();
+                double sceneHeight =  backgroundPane.getHeight();
+                double leftXCoordinate = (sceneWidth - boardWidth) / 2 ;
+                double topYCoordinate = 0;
+                double rightXCoordinate = leftXCoordinate + boardWidth;;
+                double bottomYCoordinate = boardHeight + topYCoordinate;
+
+                if(((xClicked > leftXCoordinate && xClicked < rightXCoordinate) && (yClicked > topYCoordinate && yClicked < bottomYCoordinate)) && hammerButtonClicked){
+                    int indexColumn = (int)((xClicked - leftXCoordinate) / 70);
+                    int indexRow = (int)((yClicked - topYCoordinate) / 70);
+
+                    if(model.getBoard().boardMatrix[indexRow][indexColumn] == -1){
+                        iceBreakClickCount++;
+                        for(int i = 0; i < iceBlocks.size(); i++){
+                            if(iceBlocks.get(i).getLayoutX() == (model.getXboardMatrix()[indexRow][indexColumn]) && iceBlocks.get(i).getLayoutY() == model.getYboardMatrix()[indexRow][indexColumn] && iceBreakClickCount == 4){
+                                iceBlocks.get(i).setImage(null);
+                                model.getBoard().boardMatrix[indexRow][indexColumn] = 0;
+                                iceBlocks.remove(i);
+                                iceBreakClickCount = 0;
+                            }
+                        }
+                    }
+                }
+                else{
+                    iceBreakClickCount = 0;
+                }
+            }
+        });
+
+
+        //HEDİYELERİ ALMA
+        backgroundPane.addEventFilter(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
+            @Override
+            public void handle(MouseEvent mouseEvent) {
+                double xClicked = mouseEvent.getX();
+                double yClicked = mouseEvent.getY() - 150;
+
+                double boardHeight = 350;
+                double boardWidth = 770;
+                double sceneWidth =  backgroundPane.getWidth();
+                double sceneHeight =  backgroundPane.getHeight();
+                double leftXCoordinate = (sceneWidth - boardWidth) / 2 ;
+                double topYCoordinate = 0;
+                double rightXCoordinate = leftXCoordinate + boardWidth;;
+                double bottomYCoordinate = boardHeight + topYCoordinate;
+
+                if(((xClicked > leftXCoordinate && xClicked < rightXCoordinate) && (yClicked > topYCoordinate && yClicked < bottomYCoordinate))){
+                    int indexColumn = (int)((xClicked - leftXCoordinate) / 70);
+                    int indexRow = (int)((yClicked - topYCoordinate) / 70);
+
+                    if(model.getBoard().boardMatrix[indexRow][indexColumn] == -2){
+                        model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].setExtraScore();
+                        gifts.get(0).setImage(null);
+                        model.getBoard().boardMatrix[indexRow][indexColumn] = 0;
+                        gifts.remove(0);
+                    }
+                }
+            }
+        });
+
+
+//--------------------------------------------------------------------------------------------------
+
+        //Adding event handler to unused pieces in specific level
+        for(int i = 0; i < model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getUnusedPieces().size(); i++){
+            model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getUnusedPieces().get(i).getCurrentImage().addEventHandler(MouseEvent.MOUSE_RELEASED, controller.releaseHandler);
+            model.getGame().twoDLevels[model.getGame().getCurrent2DLevel()].getUnusedPieces().get(i).getCurrentImage().addEventHandler(MouseEvent.MOUSE_PRESSED, controller.pressedHandler);
+        }
+
+        Image backgroundImage = new Image("file:images/menu/snowySecond.png");
+
+        BackgroundImage myBI= new BackgroundImage(backgroundImage, BackgroundRepeat.REPEAT, BackgroundRepeat.REPEAT, BackgroundPosition.CENTER, BackgroundSize.DEFAULT);
+
+
+        backgroundPane.setBottom(pieceBox);
+        backgroundPane.setTop(menuPane);
+        backgroundPane.setBackground(new Background(myBI));
+    }
+
+}
\ No newline at end of file
diff --git a/src/Board.java b/src/Board.java
new file mode 100755
index 0000000..1c3471b
--- /dev/null
+++ b/src/Board.java
@@ -0,0 +1,228 @@
+package sample;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+
+public class Board {
+
+
+    final int boardWidth = 770;
+    final int boardHeight = 350;
+
+    Image boardImage;
+    ImageView  boardView;
+    int[][] boardMatrix;
+    private int sceneWidth;
+    private int sceneHeight;
+    private int leftXCoordinate;
+    private int topYCoordinate;
+    private int rightXCoordinate;
+    private int bottomYCoordinate;
+    private int treshold;
+    private boolean gameOver;
+    private int score;
+    private Game game;
+
+    public Board(int[][] matrix,int sceneWidth, int sceneHeight){
+
+        game = Game.getInstance();
+        boardImage = new Image("file:images/boardLast.png");
+        boardView = new ImageView(boardImage);
+        boardMatrix = matrix;
+        this.sceneHeight = sceneHeight;
+        this.sceneWidth = sceneWidth;
+        gameOver = false;
+        score = 10;
+
+        leftXCoordinate = (this.sceneWidth - boardWidth) / 2 ;
+        topYCoordinate = 0;
+        rightXCoordinate = leftXCoordinate + boardWidth;
+        bottomYCoordinate = boardHeight + topYCoordinate;
+        treshold = 10;
+    }
+
+
+
+    public ImageView getBoardView(){
+        return boardView;
+    }
+
+    public int getBoardWidth(){
+        return boardWidth;
+    }
+
+    public void updateBoard(){
+        game = Game.getInstance();
+        boardMatrix = game.twoDLevels[game.getCurrent2DLevel()].getLevelMatrix();
+    }
+
+    // no two piece on each other
+    public boolean isAvailable(int rowIndex, int columnIndex, int[][] pieceMatrix){
+        for(int m = 0; m <4; m++){
+            for (int n = 0; n < 4; n++){
+                if(n + columnIndex >= 11){
+                    int fazlalikColumn = (n + columnIndex) - 11;
+                    if(pieceMatrix[m][n] != 0 && boardMatrix[rowIndex+m][columnIndex+n-fazlalikColumn] != 0) {
+                        if(pieceMatrix[m][n] != 0 && boardMatrix[rowIndex+m][columnIndex+n-fazlalikColumn] != -2){
+                            return false;
+                        }
+                    }
+                }
+                if(rowIndex + m >= 5){
+                    int fazlalikRow = (rowIndex + m) - 5;
+                    if(pieceMatrix[m][n] != 0 && boardMatrix[rowIndex+m-fazlalikRow][columnIndex+n] != 0) {
+                        if(pieceMatrix[m][n] != 0 && boardMatrix[rowIndex+m-fazlalikRow][columnIndex+n] != -2){
+                            return false;
+                        }
+                    }
+                }
+
+                if(pieceMatrix[m][n] != 0 && boardMatrix[rowIndex+m][columnIndex+n] != 0) {
+                    if(pieceMatrix[m][n] != 0 && boardMatrix[rowIndex+m][columnIndex+n] != -2){
+                        return false;
+                    }
+                }
+            }
+        }
+        return true;
+    }
+
+    //check is board full
+    public boolean isFull(){
+        for(int i = 0; i < 5; i++){
+            for(int j = 0; j < 11; j++){
+                if(boardMatrix[i][j] == 0)
+                    return false;
+            }
+        }
+        return true;
+    }
+
+    //Puzlle piecelerinin dogru yerde oluip olmadigini kontrol eden fonksiyon degilse boardun boundarylerinin disindaysa
+    //initial positiona geri donecek
+    public boolean checkPieceBoundary(ImageView pieceView, double xPosition, double yPosition){
+        double currentX = pieceView.getLayoutX();
+        double currentY = pieceView.getLayoutY();
+
+        if((currentX < leftXCoordinate || currentX > rightXCoordinate) || (currentY < topYCoordinate ||currentY > bottomYCoordinate)){
+            //set piece to its initial place
+            pieceView.relocate(xPosition,yPosition);
+            System.out.println(leftXCoordinate);
+            System.out.println(topYCoordinate);
+            System.out.println(rightXCoordinate);
+            System.out.print(bottomYCoordinate);
+            return false;
+        }
+
+        else{
+            return true;
+        }
+    }
+
+
+    //PIECEI BIRAZ DISARI KOYDUGUMUZDA PICECEI BOARDA FIX EDEN FONKSIYON
+    public void putPiece(Piece piece, double [][]XboardMatrix, double [][]YboardMatrix, double initX, double initY){
+        updateBoard();
+        double currentX = piece.getCurrentImage().getLayoutX();
+        double currentY = piece.getCurrentImage().getLayoutY();
+
+        int indexColumn = ((int)currentX - leftXCoordinate) / 70;
+        int indexRow = ((int)currentY - topYCoordinate) / 70;
+
+        System.out.println("index row is : " + indexRow);
+        System.out.println("index column is: " + indexColumn);
+
+        if(isAvailable(indexRow, indexColumn, piece.getMatrix())){
+            if (((XboardMatrix[indexRow][indexColumn] - treshold < currentX) && (currentX < XboardMatrix[indexRow][indexColumn + 1])) || ((YboardMatrix[indexRow][indexColumn] - treshold < currentY) && (currentY < YboardMatrix[indexRow + 1][indexColumn]))) {
+                piece.getCurrentImage().relocate(XboardMatrix[indexRow][indexColumn], YboardMatrix[indexRow][indexColumn]);
+
+            }
+
+            //set empty locations to 1
+            for(int i = 0; i < 4; i++) {
+                for(int j = 0; j < 4; j++) {
+
+                    if(piece.getMatrix()[i][j] == 1) {
+                        boardMatrix[indexRow+i][j+indexColumn] = piece.getPieceId();
+                    }
+                }
+            }
+        }
+        //if place is occupied return iinitial position do not update board
+        else{
+           // System.out.println("buraya girdi 3");
+            piece.getCurrentImage().relocate(initX,initY);
+        }
+
+        //print board matrix----------------------------------------------------------------------------------------------------------------------------------------------------------------
+        System.out.println();
+        printBoardMatrix();
+        //----------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+        if(isFull()){
+            int score = calculateScore(game.twoDLevels[game.getCurrent2DLevel()].getElapsedTime()  / 5, game.twoDLevels[game.getCurrent2DLevel()].getTime());
+            game.finishGame(score,game.twoDLevels[game.getCurrent2DLevel()].getLevelNo());
+            try {
+                Parent root = FXMLLoader.load(getClass().getResource("PauseAlertBox.fxml"));
+                Stage window = Main.getMainStage();
+                Scene scene = new Scene(root);
+                window.setTitle("Pause");
+                window.setScene(scene);
+                window.centerOnScreen();
+                Main.setMainStage(window);
+
+            } catch (IOException e) {
+                e.printStackTrace();
+            }
+        }
+    }
+
+    public void printBoardMatrix() {
+        for(int i = 0; i < 5; i++) {
+            for(int j =0; j < 11; j++) {
+                System.out.print("(");
+                System.out.print(boardMatrix[i][j]);
+                System.out.print(")");
+            }
+            System.out.println();
+        }
+    }
+
+    public int calculateScore(int elapsedTime, int levelTime){
+
+        int extraScore = game.twoDLevels[game.getCurrent2DLevel()].getExtraScore();
+        System.out.println("extraScore" + extraScore + "--");
+
+        double ratio = levelTime / elapsedTime;
+        System.out.println("elapsed time: " + elapsedTime);
+        System.out.println("level time: " + levelTime);
+        System.out.println("ratio: " + ratio);
+
+        if(ratio >= 3 )
+            score = 30;
+        else if(ratio >= 2)
+            score = 20;
+        else if (ratio >= 1)
+            score = 10;
+        else
+            score = 0;
+
+        score = score + extraScore;
+        return score;
+    }
+
+    public int getScore(){
+        return score;
+    }
+
+    public boolean isGameOver() {
+        return gameOver;
+    }
+
+}
diff --git a/src/ConnectionManager.java b/src/ConnectionManager.java
new file mode 100644
index 0000000..5de4a2a
--- /dev/null
+++ b/src/ConnectionManager.java
@@ -0,0 +1,36 @@
+/*
+ * Author: Elif Gulsah Kasdogan
+ * Class: Connection Manager for Database Connection
+ * Handles Connection Manager object will be used for database connection
+ */
+package sample;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.SQLException;
+
+//DATABASE CONNECTION MANAGER
+public class ConnectionManager {
+    private static String url;
+    private static Connection connection;
+
+    public ConnectionManager(){
+        url = "jdbc:sqlite:/Users/egeakin/Desktop/loginDB.db"; //database url
+        Connection connection = null;
+    }
+
+    public static Connection getConnection(){
+        try{
+            //System.out.println("in try block");
+            try {
+                Class.forName("org.sqlite.JDBC"); //driver name
+                connection = DriverManager.getConnection(url);
+            }catch(ClassNotFoundException e){
+                System.out.println("Driver not found!" + e);
+            }
+        } catch(SQLException e){
+            System.out.println(e);
+        }
+        return connection;
+    }
+}
diff --git a/src/Controller.java b/src/Controller.java
new file mode 100755
index 0000000..54e5bd1
--- /dev/null
+++ b/src/Controller.java
@@ -0,0 +1,4 @@
+package sample;
+
+public class Controller {
+}
diff --git a/src/DatabaseManager.java b/src/DatabaseManager.java
new file mode 100644
index 0000000..ab4be7c
--- /dev/null
+++ b/src/DatabaseManager.java
@@ -0,0 +1,305 @@
+/*
+ * Author: Elif Gulsah Kasdogan
+ * Class: Database Manager
+ * Handles database connection and related operations: sign in/sign up
+ */
+package sample;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+import java.io.PipedReader;
+import java.sql.*;
+
+
+public class DatabaseManager {
+    // all operations related to database will be done in this class
+    private final String TABLE_NAME = "table2";
+    private final int MAX_SIZE = 100;
+    private ConnectionManager connectionManager;
+    private Connection connection; //database connection
+    private Game game;
+    private User user; //bu user boş.
+
+    public DatabaseManager(){
+        game = Game.getInstance();
+        user = new User();
+        connectionManager = new ConnectionManager();
+        connection = null;
+    }
+
+    //return true if log in is successful
+    public boolean logIn(String name, String passw) throws IOException {
+        boolean result = false;
+        openDatabaseConnection();
+        if (userExists(name)) {
+            //if user exist you can log in
+            ResultSet rs = null;
+            try {
+                String query = "SELECT * FROM " + TABLE_NAME +" WHERE USERNAME = ? AND PASSWORD = ?";
+                PreparedStatement pst = connection.prepareStatement(query);
+                pst.setString(1, name);
+                pst.setString(2, passw);
+                rs = pst.executeQuery();
+                int count = 0;
+                while(rs.next()){
+                    count++;
+                }
+                //count = 1 --> one user exists with the given username and password
+                //count > 1 --> multpile users exists with the same username and password (precondition check is done)
+                //count = 0 --> user DNE
+                if(count == 1){
+                    //log in successful
+                    System.out.println("Successful log in");
+                    //game.setUsername(name); //NULL POINTER yedik
+                    //read level and score from database
+
+                    int level = -9; //databaseden çekilecek
+                    level = retrieveLevel(name);
+
+                    int score = -9; //databaseden çekilecek
+                    score = retrieveScore(name);
+
+                    user.setUsername(name);
+                    user.setScore(score);
+                    user.setLastPassedLevel(level);
+                    game.setUser(user); //game now has the user
+                    game.printUserInfo();
+                    result = true;
+                }
+                else{
+                    System.out.println("Unsuccessful log in");
+                }
+            }
+            catch(SQLException e){
+                System.out.println("Exception in logIn method" + e);
+            }
+        }
+        closeDatabaseConnection();
+        return result;
+    }
+
+    //return true if register is successful
+    public boolean registerUser(String username, String password){
+        //add new user to database if username is not taken
+        //first open database connection
+        openDatabaseConnection();
+        if(!userExists(username)){
+            System.out.println("User does not exists");
+            //user is not in database
+            int levelNo = 0; //initial level is 0
+            int score = 0; //initially score is 0
+            String sql = "INSERT INTO " + TABLE_NAME + " (username,password,level,totalScore) VALUES(?,?,?,?)";
+
+            try {
+                PreparedStatement pstmt = connection.prepareStatement(sql);
+                pstmt.setString(1,username);
+                pstmt.setString(2,password);
+                pstmt.setInt(3,levelNo);
+                pstmt.setInt(4, score);
+                pstmt.executeUpdate();
+
+                //user ın score ve level ı ayarlanmalı
+                user.setUsername(username);
+                user.setScore(score);
+                user.setLastPassedLevel(levelNo);
+
+                game.setUser(user); //game now has the user
+                game.printUserInfo();
+
+                return true;
+
+            } catch(SQLException e){
+                System.out.println("Exception in register user method" + e);
+                return false;
+            }
+        }
+        else{
+            System.out.println("User exists!");
+        }
+        return false;
+    }
+
+    //returns true if user exists
+    public boolean userExists(String name){
+        //check database
+        //return true if user is in database
+        boolean result = false;
+        ResultSet rs = null;
+        try{
+            String query = "SELECT * FROM " + TABLE_NAME + " WHERE USERNAME = ?";
+            PreparedStatement pst = connection.prepareStatement(query);
+            pst.setString(1,name);
+            rs = pst.executeQuery();
+
+            int count = 0;
+            while(rs.next()){
+                count++;
+            }
+            if(count == 1){
+                //user exists
+                result  = true;
+            }
+            //if(count > 1) --> user duplicate but we will not have such a case
+            else{
+                //user does not exist
+                result = false;
+            }
+
+        } catch(SQLException e){
+            System.out.println("Exception in userExists method: " + e);
+        }
+        return result;
+    }
+
+    //return true if update score is successful
+    //update score in database
+    public boolean updateScore(String username, int score){
+        //return true if score change is successful
+        /*
+        updateScore ve updateLevelPasssed oyun bittikten sonra çağırılacak
+        oyunu oynayan kişinin bilgileri database e yazılabilsin diye
+         */
+        boolean result = false;
+        openDatabaseConnection();
+
+        if(userExists(username)){
+            //update score if user exists
+
+            String sql = "UPDATE " + TABLE_NAME + " SET TOTALSCORE = ? WHERE USERNAME = ?";
+            try {
+                PreparedStatement pst = connection.prepareStatement(sql);
+                pst.setInt(1, score);
+                pst.setString(2,username);
+                pst.executeUpdate();
+                result = true;
+
+            } catch (SQLException e) {
+                System.out.println("Exception in updateScore method" + e);
+                //e.printStackTrace();
+            }
+        }
+
+        closeDatabaseConnection();
+        return result;
+    }
+
+    //update last level passed in database, return true if update is successful
+    public boolean updateLevelPassed(String username, int levelPassed){
+
+        //oyundan userın son levelını alıp database e yazacak
+        openDatabaseConnection();
+        int level = 0;
+
+        if(userExists(username)){
+            String sql = "UPDATE " + TABLE_NAME + " SET LEVEL = ? WHERE USERNAME = ?";
+
+            level = levelPassed; //write last passed level of user object to database
+
+            try {
+                PreparedStatement pst = connection.prepareStatement(sql);
+                pst.setInt(1, level);
+                pst.setString(2, username);
+                pst.executeUpdate();
+                closeDatabaseConnection();
+                return true;
+
+            } catch (SQLException e) {
+                System.out.println("Exception in updateLevel method" + e);
+            }
+        }
+        closeDatabaseConnection();
+        return false;
+    }
+
+    public void openDatabaseConnection(){
+        connection = connectionManager.getConnection(); // we will use this connection to change database
+    }
+
+    public void closeDatabaseConnection(){
+        try{
+            connection.close();
+
+        } catch(SQLException e){
+            System.out.println("Cannot close Database");
+        }
+
+    }
+
+    //returns last passed level of user
+    public int retrieveLevel(String username){
+        openDatabaseConnection();
+        int level = 0;
+        String sql = "SELECT LEVEL FROM " + TABLE_NAME + " WHERE USERNAME = ?";
+        ResultSet rs = null;
+        try {
+            PreparedStatement pst = connection.prepareStatement(sql);
+            pst.setString(1,username);
+            rs = pst.executeQuery();
+
+            while(rs.next()){
+                level = rs.getInt("LEVEL");
+            }
+
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        closeDatabaseConnection();
+        return level;
+    }
+
+    public int retrieveScore(String username){
+        openDatabaseConnection();
+        int score = 0;
+        String sql = "SELECT TOTALSCORE FROM " + TABLE_NAME + " WHERE USERNAME = ?";
+        ResultSet rs = null;
+        try {
+            PreparedStatement pst = connection.prepareStatement(sql);
+            pst.setString(1,username);
+            rs = pst.executeQuery();
+
+            while(rs.next()){
+                score = rs.getInt("TOTALSCORE");
+            }
+
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        closeDatabaseConnection();
+        return score;
+    }
+
+    //return user array
+    public User[] fillLeaderBoard(User[]userArray){
+        openDatabaseConnection();
+
+        int index = 0;
+        String sql = "SELECT* FROM " + TABLE_NAME;
+        ResultSet rs = null;
+
+        try {
+            PreparedStatement pst = connection.prepareStatement(sql);
+            rs = pst.executeQuery();
+            while(rs.next()){
+                String username = rs.getString("USERNAME");
+                int lastLevelPassed = rs.getInt("LEVEL");
+                int totalScore = rs.getInt("TOTALSCORE");
+
+                User newUser = new User();
+                newUser.setUsername(username);
+                newUser.setLastPassedLevel(lastLevelPassed);
+                newUser.setScore(totalScore);
+                userArray[index] = newUser;
+                index++;
+            }
+
+        } catch (SQLException e) {
+            e.printStackTrace();
+        }
+        closeDatabaseConnection();
+        return userArray;
+    }
+}
\ No newline at end of file
diff --git a/src/Game.java b/src/Game.java
new file mode 100755
index 0000000..93f3367
--- /dev/null
+++ b/src/Game.java
@@ -0,0 +1,726 @@
+package sample;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+import java.util.ArrayList;
+
+public class Game {
+
+    Piece pieceOne;
+    Piece pieceTwo;
+    Piece pieceThree;
+    Piece pieceThreeVersion2;
+    Piece pieceFour;
+    Piece pieceFive;
+    Piece pieceSix;
+    Piece pieceSixVersion2;
+    Piece pieceSeven;
+    Piece pieceEight;
+    Piece pieceNine;
+    Piece pieceTen;
+    Piece pieceTenVersion2;
+    Piece pieceEleven;
+    Piece pieceTwelve;
+    Piece pieceTwelve2;
+    Piece pieceTwo2;
+    Piece pieceEleven2;
+
+    //Levels Declaration Assume we have 5 twoDLevels
+    Level levelOne;
+    Level levelTwo;
+    Level levelThree;
+    Level levelFour;
+    Level levelFive;
+    Level levelSix;
+    Level levelSeven;
+
+    Level[] twoDLevels;
+
+    private int current2DLevel;
+    private int current3DLevel;
+
+    private int lastPassed2d;
+
+    private static Game ourInstance = new Game();
+
+    User user;
+    DatabaseManager database;
+
+    public static Game getInstance() {
+        return ourInstance;
+    }
+
+    public static void setInstance(Game gameInstance){
+        ourInstance = gameInstance;
+    }
+
+    private Game(){
+        current2DLevel = 0;
+        current3DLevel = 0;
+        lastPassed2d = 0;
+        user = new User();
+        database = new DatabaseManager();
+
+        twoDLevels = new Level[15];
+
+        constructPieces();
+        constructLevels();
+    }
+
+    public void constructPieces(){
+
+
+            // PIECE 1
+            int[][] pieceOneMatrix = new int[4][4];
+            pieceOneMatrix[0][0]  = 1;
+            pieceOneMatrix[1][0]  = 1;
+            pieceOneMatrix[2][0]  = 1;
+            pieceOneMatrix[2][1]  = 1;
+            pieceOneMatrix[3][1]  = 1;
+
+            int pieceOneId = 1;
+            Image pieceOneImage = new Image("file:images/p1.png");
+            ImageView pieceOneImageView = new ImageView(pieceOneImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 2
+            int[][] pieceTwoMatrix = new int[4][4];
+            pieceTwoMatrix[2][0]  = 1;
+            pieceTwoMatrix[2][1]  = 1;
+            pieceTwoMatrix[2][2]  = 1;
+            pieceTwoMatrix[1][2]  = 1;
+            pieceTwoMatrix[0][2]  = 1;
+
+            int pieceTwoId = 2;
+            Image pieceTwoImage = new Image("file:images/p2.png");
+            ImageView pieceTwoImageView = new ImageView(pieceTwoImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            //PIECE 3
+            int [][]pieceThreeMatrix = new int[4][4];
+            pieceThreeMatrix[0][0] = 1;
+            pieceThreeMatrix[0][1] = 1;
+            pieceThreeMatrix[0][2] = 1;
+            pieceThreeMatrix[0][3] = 1;
+            pieceThreeMatrix[1][2] = 1;
+
+            int pieceThreeId = 3;
+            Image pieceThreeImage = new Image("file:images/p3.png");
+            ImageView pieceThreeImageView = new ImageView(pieceThreeImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+
+            //PIECE 3 Version 2
+            int [][]pieceThreeVersion2Matrix = new int[4][4];
+            pieceThreeVersion2Matrix[0][0] = 1;
+            pieceThreeVersion2Matrix[0][1] = 1;
+            pieceThreeVersion2Matrix[0][2] = 1;
+            pieceThreeVersion2Matrix[0][3] = 1;
+            pieceThreeVersion2Matrix[1][2] = 1;
+
+            int pieceThreeVersion2Id = 30;
+            Image pieceThreeVersion2Image = new Image("file:images/p3Version2.png");
+            ImageView pieceThreeVersion2ImageView = new ImageView(pieceThreeVersion2Image);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            //PIECE 4
+            int [][]pieceFourMatrix = new int[4][4];
+            pieceFourMatrix[0][0] = 1;
+            pieceFourMatrix[1][0] = 1;
+            pieceFourMatrix[1][1] = 1;
+
+            int pieceFourId = 4;
+            Image pieceFourImage = new Image("file:images/p4.png");
+            ImageView pieceFourImageView = new ImageView(pieceFourImage);
+
+
+            //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 5
+            int[][] pieceFiveMatrix = new int[4][4];
+            pieceFiveMatrix[0][1]  = 1;
+            pieceFiveMatrix[1][0]  = 1;
+            pieceFiveMatrix[1][1]  = 1;
+            pieceFiveMatrix[2][1]  = 1;
+
+            int pieceFiveId = 5;
+            Image pieceFiveImage = new Image("file:images/p5.png");
+            ImageView pieceFiveImageView = new ImageView(pieceFiveImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 6
+            int[][] pieceSixMatrix = new int[4][4];
+            pieceSixMatrix[0][1]  = 1;
+            pieceSixMatrix[1][0]  = 1;
+            pieceSixMatrix[1][1]  = 1;
+            pieceSixMatrix[2][1]  = 1;
+            pieceSixMatrix[2][2]  = 1;
+
+            int pieceSixId = 6;
+            Image pieceSixImage = new Image("file:images/p6.png");
+            ImageView pieceSixImageView = new ImageView(pieceSixImage);
+
+        //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 6 VERSION 2
+            int[][] pieceSixVersion2Matrix = new int[4][4];
+            pieceSixVersion2Matrix[0][2]  = 1;
+            pieceSixVersion2Matrix[1][2]  = 1;
+            pieceSixVersion2Matrix[1][3]  = 1;
+            pieceSixVersion2Matrix[2][1]  = 1;
+            pieceSixVersion2Matrix[2][2]  = 1;
+
+            int pieceSixVersion2Id = 60;
+            Image pieceSixVersion2Image = new Image("file:images/p6Version2.png");
+            ImageView pieceSixVersion2ImageView = new ImageView(pieceSixVersion2Image);
+
+        //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 7
+            int[][] pieceSevenMatrix = new int[4][4];
+            pieceSevenMatrix[0][1]  = 1;
+            pieceSevenMatrix[1][0]  = 1;
+            pieceSevenMatrix[1][1]  = 1;
+            pieceSevenMatrix[2][0]  = 1;
+
+            int pieceSevenId = 7;
+            Image pieceSevenImage = new Image("file:images/p7.png");
+            ImageView pieceSevenImageView = new ImageView(pieceSevenImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 8
+            int[][] pieceEightMatrix = new int[4][4];
+            pieceEightMatrix[0][1]  = 1;
+            pieceEightMatrix[1][0]  = 1;
+            pieceEightMatrix[1][1]  = 1;
+            pieceEightMatrix[2][0]  = 1;
+
+            int pieceEightId = 8;
+            Image pieceEightImage = new Image("file:images/p8.png");
+            ImageView pieceEightImageView = new ImageView(pieceEightImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 9
+            int[][] pieceNineMatrix = new int[4][4];
+            pieceNineMatrix[0][0]  = 1;
+            pieceNineMatrix[0][1]  = 1;
+            pieceNineMatrix[1][0]  = 1;
+            pieceNineMatrix[1][1]  = 1;
+            pieceNineMatrix[1][2]  = 1;
+
+            int pieceNineId = 9;
+            Image pieceNineImage = new Image("file:images/p9.png");
+            ImageView pieceNineImageView = new ImageView(pieceNineImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 10
+            int[][] pieceTenMatrix = new int[4][4];
+            pieceTenMatrix[0][0]  = 1;
+            pieceTenMatrix[0][1]  = 1;
+            pieceTenMatrix[1][1]  = 1;
+            pieceTenMatrix[2][1]  = 1;
+            pieceTenMatrix[3][1]  = 1;
+
+            int pieceTenId = 10;
+            Image pieceTenImage = new Image("file:images/p10.png");
+            ImageView pieceTenImageView = new ImageView(pieceTenImage);
+
+            //---------------------------------------------------------------------------------------------------------
+
+
+            // PIECE 10 Version 2
+            int[][] pieceTenVersion2Matrix = new int[4][4];
+            pieceTenVersion2Matrix[0][2]  = 1;
+            pieceTenVersion2Matrix[0][3]  = 1;
+            pieceTenVersion2Matrix[1][2]  = 1;
+            pieceTenVersion2Matrix[2][2]  = 1;
+            pieceTenVersion2Matrix[3][2]  = 1;
+
+            int pieceTenVersion2Id = 100;
+            Image pieceTenVersion2Image = new Image("file:images/p10Version2.png");
+            ImageView pieceTenVersion2ImageView = new ImageView(pieceTenVersion2Image);
+
+
+        //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 11
+            int[][] pieceElevenMatrix = new int[4][4];
+            pieceElevenMatrix[0][0]  = 1;
+            pieceElevenMatrix[0][1]  = 1;
+            pieceElevenMatrix[0][2]  = 1;
+            pieceElevenMatrix[1][0]  = 1;
+            pieceElevenMatrix[1][2]  = 1;
+
+            int pieceElevenId = 11;
+            Image pieceElevenImage= new Image("file:images/p11.png");
+            ImageView pieceElevenImageView = new ImageView(pieceElevenImage);
+            //pieceElevenImageView.setFitWidth(240);
+            //pieceElevenImageView.setFitHeight(240);
+
+            //---------------------------------------------------------------------------------------------------------
+
+            // PIECE 12
+            int[][] pieceTwelveMatrix = new int[4][4];
+            pieceTwelveMatrix[0][0]  = 1;
+            pieceTwelveMatrix[1][0]  = 1;
+            pieceTwelveMatrix[1][1]  = 1;
+            pieceTwelveMatrix[2][1]  = 1;
+            pieceTwelveMatrix[2][2]  = 1;
+
+            int pieceTwelveId = 12;
+            Image pieceTwelveImage = new Image("file:images/p12.png");
+            ImageView pieceTwelveImageView = new ImageView(pieceTwelveImage);
+
+        //---------------------------------------------------------------------------------------------------------
+        // PIECE 13
+        int[][] pieceTwo2Matrix = new int[4][4];
+        pieceTwo2Matrix[2][0]  = 1;
+        pieceTwo2Matrix[2][1]  = 1;
+        pieceTwo2Matrix[2][2]  = 1;
+        pieceTwo2Matrix[1][2]  = 1;
+        pieceTwo2Matrix[0][2]  = 1;
+
+        int pieceTwo2Id = 2;
+        Image pieceTwo2Image = new Image("file:images/p2.png");
+        ImageView pieceTwo2ImageView = new ImageView(pieceTwo2Image);
+
+        //---------------------------------------------------------------------------------------------------------
+
+        // PIECE 12-2
+        int[][] pieceTwelve2Matrix = new int[4][4];
+        pieceTwelve2Matrix[0][0]  = 1;
+        pieceTwelve2Matrix[1][0]  = 1;
+        pieceTwelve2Matrix[1][1]  = 1;
+        pieceTwelve2Matrix[2][1]  = 1;
+        pieceTwelve2Matrix[2][2]  = 1;
+
+        int pieceTwelve2Id = 12;
+        Image pieceTwelve2Image = new Image("file:images/p12.png");
+        ImageView pieceTwelve2ImageView = new ImageView(pieceTwelve2Image);
+        //---------------------------------------------------------------------------------------------------------
+
+        // PIECE 11-2
+        int[][] pieceEleven2Matrix = new int[4][4];
+        pieceEleven2Matrix[0][0]  = 1;
+        pieceEleven2Matrix[0][1]  = 1;
+        pieceEleven2Matrix[0][2]  = 1;
+        pieceEleven2Matrix[1][0]  = 1;
+        pieceEleven2Matrix[1][2]  = 1;
+
+        int pieceEleven2Id = 11;
+        Image pieceEleven2Image= new Image("file:images/p11.png");
+        ImageView pieceEleven2ImageView = new ImageView(pieceEleven2Image);
+
+
+        //PIECE CONSTRUCTIONS
+            pieceOne = new Piece(pieceOneId, pieceOneImageView, pieceOneMatrix);
+            pieceTwo = new Piece(pieceTwoId, pieceTwoImageView, pieceTwoMatrix);
+            pieceThree = new Piece(pieceThreeId, pieceThreeImageView, pieceThreeMatrix);
+            pieceThreeVersion2 = new Piece(pieceThreeVersion2Id, pieceThreeVersion2ImageView, pieceThreeVersion2Matrix);
+            pieceFour = new Piece(pieceFourId, pieceFourImageView, pieceFourMatrix);
+            pieceFive = new Piece(pieceFiveId, pieceFiveImageView, pieceFiveMatrix);
+            pieceSix = new Piece(pieceSixId, pieceSixImageView, pieceSixMatrix);
+            pieceSixVersion2 = new Piece(pieceSixVersion2Id, pieceSixVersion2ImageView, pieceSixVersion2Matrix);
+            pieceSeven = new Piece(pieceSevenId, pieceSevenImageView, pieceSevenMatrix);
+            pieceEight = new Piece(pieceEightId, pieceEightImageView, pieceEightMatrix);
+            pieceNine = new Piece(pieceNineId, pieceNineImageView, pieceNineMatrix);
+            pieceTen = new Piece(pieceTenId, pieceTenImageView, pieceTenMatrix);
+            pieceTenVersion2 = new Piece(pieceTenVersion2Id, pieceTenVersion2ImageView, pieceTenVersion2Matrix);
+            pieceEleven = new Piece(pieceElevenId, pieceElevenImageView, pieceElevenMatrix);
+            pieceTwelve = new Piece(pieceTwelveId, pieceTwelveImageView, pieceTwelveMatrix);
+            pieceTwo2 = new Piece(pieceTwo2Id, pieceTwo2ImageView, pieceTwo2Matrix);
+            pieceTwelve2 = new Piece(pieceTwelveId, pieceTwelve2ImageView, pieceTwelve2Matrix);
+            pieceEleven2 = new Piece(pieceEleven2Id, pieceEleven2ImageView, pieceEleven2Matrix);
+
+
+            //---------------------------------------------------------------------------------------------------------
+    }
+
+
+    // bu metod bütün levelları initalize eder
+    public void constructLevels(){
+
+        int levelWidth = 11;
+        int levelHeight = 5;
+
+        //----------------------------------------------------------------------------------------------
+
+        // LEVEL 1 CONSTRUCTION
+        int[][] levelOneMatrix = new int[levelHeight][levelWidth];
+        for(int i = 0; i < levelHeight; i++){
+            for(int m = 0; m < levelWidth; m++){
+                levelOneMatrix[i][m] = 1;
+            }
+        }
+
+        levelOneMatrix[0][10] = 0;
+        levelOneMatrix[1][10] = 0;
+        levelOneMatrix[2][10] = 0;
+        levelOneMatrix[3][10] = 0;
+        levelOneMatrix[4][10] = 0;
+        levelOneMatrix[0][9] = 0;
+        levelOneMatrix[1][9] = 0;
+        levelOneMatrix[2][9] = 0;
+        levelOneMatrix[3][9] = 0;
+        levelOneMatrix[4][9] = 0;
+        levelOneMatrix[1][8] = 0;
+        levelOneMatrix[2][8] = 0;
+        levelOneMatrix[3][8] = 0;
+        levelOneMatrix[1][7] = 0;
+        levelOneMatrix[2][7] = 0;
+
+        ArrayList<Piece> unusedPieces = new ArrayList<>();
+        unusedPieces.add(pieceTen);
+        unusedPieces.add(pieceEleven);
+        unusedPieces.add(pieceTwelve);
+
+
+        Image levelOneImage = new Image("file:images/level1Board.png");
+        ImageView levelOneView = new ImageView(levelOneImage);
+        levelOne = new Level(0,60, unusedPieces, levelOneMatrix, levelOneView);
+
+        //----------------------------------------------------------------------------------------------
+
+        //LEVEL 2 CONSTRUCTION
+        int[][] levelTwoMatrix = new int[levelHeight][levelWidth];
+        for(int i = 0; i < levelHeight; i++){
+            for(int m = 0; m < levelWidth; m++){
+                levelTwoMatrix[i][m] = 1;
+            }
+        }
+
+        levelTwoMatrix[1][7] = 0;
+        levelTwoMatrix[1][9] = 0;
+        levelTwoMatrix[2][6] = 0;
+        levelTwoMatrix[2][7] = 0;
+        levelTwoMatrix[2][8] = 0;
+        levelTwoMatrix[2][9] = 0;
+        levelTwoMatrix[2][10] = 0;
+        levelTwoMatrix[3][7] = 0;
+        levelTwoMatrix[3][8] = 0;
+        levelTwoMatrix[3][9] = 0;
+        levelTwoMatrix[3][10] = 0;
+        levelTwoMatrix[4][8] = 0;
+        levelTwoMatrix[4][9] = 0;
+        levelTwoMatrix[4][10] = 0;
+
+
+        ArrayList<Piece> unusedPieces2 = new ArrayList<>();
+        unusedPieces2 = new ArrayList<>();
+        unusedPieces2.add(pieceTwo);
+        unusedPieces2.add(pieceSix);
+        unusedPieces2.add(pieceFive);
+
+        Image levelTwoImage = new Image("file:images/level2Board.png");
+        ImageView levelTwoView = new ImageView(levelTwoImage);
+        levelTwo = new Level(1,60, unusedPieces2, levelTwoMatrix, levelTwoView);
+
+        //----------------------------------------------------------------------------------------------
+
+        //LEVEL 3 CONSTRUCTION (Level 6 in real game)
+
+        int[][] levelThreeMatrix = new int[levelHeight][levelWidth];
+        for(int i = 0; i < levelHeight; i++){
+            for(int m = 0; m < levelWidth; m++){
+                levelThreeMatrix[i][m] = 2;
+            }
+        }
+
+        levelThreeMatrix[2][2] = 0;
+        levelThreeMatrix[2][3] = 0;
+        levelThreeMatrix[2][4] = 0;
+        levelThreeMatrix[3][0] = 0;
+        levelThreeMatrix[3][1] = 0;
+        levelThreeMatrix[3][2] = 0;
+        levelThreeMatrix[3][3] = 0;
+        levelThreeMatrix[3][4] = 0;
+        levelThreeMatrix[4][0] = 0;
+        levelThreeMatrix[4][1] = 0;
+        levelThreeMatrix[4][2] = 0;
+        levelThreeMatrix[4][3] = 0;
+        levelThreeMatrix[4][4] = 0;
+
+        ArrayList<Piece> unusedPieces3 = new ArrayList<>();
+        unusedPieces3.add(pieceOne);
+        unusedPieces3.add(pieceFour);
+        unusedPieces3.add(pieceTenVersion2);
+
+        Image levelThreeImage = new Image("file:images/level6Board.png");
+        ImageView levelThreeView = new ImageView(levelThreeImage);
+        levelThree = new Level(2,60, unusedPieces3,  levelThreeMatrix, levelThreeView);
+
+        //----------------------------------------------------------------------------------------------
+
+        //LEVEL 4 CONSTRUCTION (Level 8 in real game)
+
+        int[][] levelFourMatrix = new int[levelHeight][levelWidth];
+        for(int i = 0; i < levelHeight; i++){
+            for(int m = 0; m < levelWidth; m++){
+                levelFourMatrix[i][m] = 0;
+            }
+        }
+
+        levelFourMatrix[1][1] = 0;
+        levelFourMatrix[2][0] = 0;
+        levelFourMatrix[2][1] = 0;
+        levelFourMatrix[2][2] = 0;
+        levelFourMatrix[2][3] = 0;
+        levelFourMatrix[3][0] = 0;
+        levelFourMatrix[3][1] = 0;
+        levelFourMatrix[3][2] = 0;
+        levelFourMatrix[3][3] = 0;
+        levelFourMatrix[4][0] = 0;
+        levelFourMatrix[4][1] = 0;
+        levelFourMatrix[4][2] = 0;
+        levelFourMatrix[4][3] = 0;
+
+        ArrayList<Piece> unusedPieces4 = new ArrayList<>();
+        unusedPieces4.add(pieceThreeVersion2);
+        unusedPieces4.add(pieceFour);
+        unusedPieces4.add(pieceSix);
+
+        Image levelFourImage = new Image("file:images/level8Board.png");
+        ImageView levelFourView = new ImageView(levelFourImage);
+        levelFour = new Level(3,60, unusedPieces4, levelFourMatrix, levelFourView);
+
+        //----------------------------------------------------------------------------------------------
+
+        //LEVEL 5 CONSTRUCTION (Level 10 in real game)
+
+        int[][] levelFiveMatrix = new int[levelHeight][levelWidth];
+        for(int i = 0; i < levelHeight; i++){
+            for(int m = 0; m < levelWidth; m++){
+                levelFiveMatrix[i][m] = 13;
+            }
+        }
+
+        levelFiveMatrix[0][6] = 0;
+        levelFiveMatrix[0][7] = 0;
+        levelFiveMatrix[0][8] = 0;
+        levelFiveMatrix[0][9] = 0;
+        levelFiveMatrix[0][10] = 0;
+        levelFiveMatrix[1][6] = 0;
+        levelFiveMatrix[1][7] = 0;
+        levelFiveMatrix[1][8] = 0;
+        levelFiveMatrix[1][9] = 0;
+        levelFiveMatrix[1][10] = 0;
+        levelFiveMatrix[2][7] = 0;
+        levelFiveMatrix[2][8] = 0;
+        levelFiveMatrix[2][9] = 0;
+        levelFiveMatrix[2][10] = 0;
+        levelFiveMatrix[3][8] = 0;
+        levelFiveMatrix[3][9] = 0;
+        levelFiveMatrix[3][10] = 0;
+        levelFiveMatrix[4][8] = 0;
+        levelFiveMatrix[4][9] = 0;
+        levelFiveMatrix[4][10] = 0;
+
+
+        ArrayList<Piece> unusedPieces5 = new ArrayList<>();
+        unusedPieces5.add(pieceTwo2);
+        unusedPieces5.add(pieceNine);
+        unusedPieces5.add(pieceEleven2);
+        unusedPieces5.add(pieceTwelve2);
+
+        Image levelFiveImage = new Image("file:images/level10Board.png");
+        ImageView levelFiveView = new ImageView(levelFiveImage);
+        levelFive = new Level(4,120, unusedPieces5, levelFiveMatrix, levelFiveView);
+
+        //----------------------------------------------------------------------------------------------
+
+        //LEVEL 6 CONSTRUCTION (12 in real game)
+
+        int[][] levelSixMatrix = new int[levelHeight][levelWidth];
+        for(int i = 0; i < levelHeight; i++){
+            for(int m = 0; m < levelWidth; m++){
+                levelSixMatrix[i][m] = 2;
+            }
+        }
+
+        levelSixMatrix[1][0] = 0;
+        levelSixMatrix[2][0] = 0;
+        levelSixMatrix[3][0] = 0;
+        levelSixMatrix[4][0] = 0;
+        levelSixMatrix[2][1] = 0;
+        levelSixMatrix[3][1] = 0;
+        levelSixMatrix[4][1] = 0;
+        levelSixMatrix[2][2] = 0;
+        levelSixMatrix[3][2] = 0;
+        levelSixMatrix[4][2] = 0;
+        levelSixMatrix[1][3] = 0;
+        levelSixMatrix[2][3] = 0;
+        levelSixMatrix[3][3] = 0;
+        levelSixMatrix[4][3] = 0;
+        levelSixMatrix[1][4] = 0;
+        levelSixMatrix[2][4] = 0;
+        levelSixMatrix[3][4] = 0;
+        levelSixMatrix[4][4] = 0;
+        levelSixMatrix[4][5] = 0;
+        levelSixMatrix[3][5] = 0;
+
+        ArrayList<Piece> unusedPieces6 = new ArrayList<>();
+        unusedPieces6.add(pieceThreeVersion2);
+        unusedPieces6.add(pieceTenVersion2);
+        unusedPieces6.add(pieceTwelve);
+        unusedPieces6.add(pieceSixVersion2);
+
+        Image levelSixImage = new Image("file:images/level12Board.png");
+        ImageView levelSixView = new ImageView(levelSixImage);
+        levelSix = new Level(5,60, unusedPieces6, levelSixMatrix, levelSixView);
+
+        //----------------------------------------------------------------------------------------------
+
+        //LEVEL 7 CONSTRUCTION (35 in real game)
+
+        int[][] levelSevenMatrix = new int[levelHeight][levelWidth];
+        for(int i = 0; i < levelHeight; i++){
+            for(int m = 0; m < levelWidth; m++){
+                levelSevenMatrix[i][m] = 0;
+            }
+        }
+        levelSevenMatrix[0][0] = 2;
+        levelSevenMatrix[1][0] = 2;
+        levelSevenMatrix[2][0] = 2;
+        levelSevenMatrix[0][1] = 2;
+        levelSevenMatrix[1][1] = 2;
+        levelSevenMatrix[0][2] = 2;
+        levelSevenMatrix[1][2] = 2;
+        levelSevenMatrix[0][3] = 2;
+        levelSevenMatrix[0][4] = 2;
+        levelSevenMatrix[1][4] = 2;
+        levelSevenMatrix[2][4] = 2;
+        levelSevenMatrix[2][5] = 2;
+        levelSevenMatrix[2][6] = 2;
+        levelSevenMatrix[3][6] = 2;
+
+
+        ArrayList<Piece> unusedPieces7 = new ArrayList<>();
+        unusedPieces7.add(pieceOne);
+        unusedPieces7.add(pieceTwo);
+        unusedPieces7.add(pieceThree);
+        unusedPieces7.add(pieceFour);
+        unusedPieces7.add(pieceFive);
+        unusedPieces7.add(pieceSix);
+        unusedPieces7.add(pieceSeven);
+        unusedPieces7.add(pieceTen);
+        unusedPieces7.add(pieceTwelve);
+
+        Image levelSevenImage = new Image("file:images/level35.png");
+        ImageView levelSevenView = new ImageView(levelSevenImage);
+        levelSeven = new Level(6,60, unusedPieces7, levelSevenMatrix, levelSevenView);
+
+        //----------------------------------------------------------------------------------------------
+        
+        twoDLevels[0] = levelOne;
+        twoDLevels[1] = levelTwo;
+        twoDLevels[2] = levelThree;
+        twoDLevels[3] = levelFive;
+        twoDLevels[4] = levelSix;
+        twoDLevels[5] = levelTwo;
+        twoDLevels[6] = levelOne;
+
+        //twoDLevels[5] = levelSeven;
+        //twoDLevels[6] = levelFour;
+    }
+
+
+    public void finishGame(int score, int levelId){
+        if(lastPassed2d < levelId)
+            lastPassed2d = levelId;
+        twoDLevels[current2DLevel].setHighScore(score);
+        current2DLevel++;
+        userScore();
+        System.out.print("this last pass" + lastPassed2d);
+    }
+
+    public void setSettings(){
+        // Will be imlemented later
+    }
+
+    public void nextLevel(){
+
+        user.setLastPassedLevel(current2DLevel + 1);
+
+        //SİL
+        printUserInfo();
+
+        current2DLevel++;
+    }
+
+
+
+    public void setUser(User newUser){
+        user = newUser;
+    }
+
+    public void printUserInfo(){
+        System.out.println("USER:");
+        System.out.println("username: " + user.getUsername() + "\nscore: " + user.getScore() + "\nlast passed: " + user.getLastPassedLevel());
+    }
+
+    public int getCurrent2DLevel(){
+        return current2DLevel;
+    }
+
+
+    public void replayLevel(){
+        current2DLevel+=1;
+        current2DLevel-=1;
+    }
+
+    public void replay(){
+        try {
+            twoDLevels[current2DLevel].setElapsedTime(0);
+            Parent root = FXMLLoader.load(getClass().getResource("View/GameOverScreen.fxml"));
+            Stage window = Main.getMainStage();
+            Scene scene = new Scene(root);
+            window.setTitle("GAME OVER");
+            window.setScene(scene);
+            window.centerOnScreen();
+            Main.setMainStage(window);
+
+        } catch (IOException e) {
+            e.printStackTrace();
+        }
+    }
+
+
+    public void userScore(){
+
+        int totalScore = 0;
+        for(int i = 0; i < lastPassed2d + 1; i++)
+            totalScore += twoDLevels[i].getHighScore();
+        System.out.println("totalScore"+ totalScore);
+
+        user.setScore(totalScore);
+        user.setLastPassedLevel(lastPassed2d);
+        database.updateScore(user.getUsername(), user.getScore());
+        database.updateLevelPassed(user.getUsername(), user.getLastPassedLevel());
+    }
+
+    public int getLastPassed2d(){
+        return lastPassed2d;
+    }
+
+    public void setCurrent2DLevel(int level){
+        current2DLevel = level;
+    }
+
+
+
+}
+
diff --git a/src/GameOverScreen.fxml b/src/GameOverScreen.fxml
new file mode 100644
index 0000000..dcfe1a8
--- /dev/null
+++ b/src/GameOverScreen.fxml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+
+<AnchorPane prefHeight="286.0" prefWidth="442.0" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.GameOverScreen">
+    <children>
+        <ImageView fitHeight="451.0" fitWidth="621.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/FinishScreen.png" />
+            </image>
+        </ImageView>
+        <ImageView fitHeight="84.0" fitWidth="384.0" layoutX="129.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/Ribbon.png" />
+            </image>
+        </ImageView>
+        <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="221.0" layoutY="52.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/gameover.png" />
+            </image>
+        </ImageView>
+        <ImageView fitHeight="160.0" fitWidth="284.0" layoutX="232.0" layoutY="115.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/gameOverStar.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="replayView" fitHeight="90.0" fitWidth="125.0" layoutX="345.0" layoutY="277.0" onMousePressed="#replayButtonHandle" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/DoneButton.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="exitView" fitHeight="90.0" fitWidth="125.0" layoutX="208.0" layoutY="277.0" onMousePressed="#exitButtonHandle" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/ReplayButton.png" />
+            </image>
+        </ImageView>
+        <Label layoutX="368.0" layoutY="367.0" text="Replay" />
+        <Label layoutX="240.0" layoutY="367.0" text="Exit" />
+    </children>
+</AnchorPane>
diff --git a/src/GameOverScreen.java b/src/GameOverScreen.java
new file mode 100644
index 0000000..947844c
--- /dev/null
+++ b/src/GameOverScreen.java
@@ -0,0 +1,44 @@
+package sample;
+
+import javafx.application.Platform;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+
+import javax.swing.text.html.ImageView;
+import java.io.IOException;
+
+public class GameOverScreen {
+
+    ImageView replayView;
+    ImageView exitView;
+    Game game;
+
+
+    public void exitButtonHandle() throws IOException {
+        Platform.exit();
+
+    }
+
+
+    public void replayButtonHandle() throws IOException {
+        Game game = Game.getInstance();
+        game.replayLevel();
+        Game.setInstance(game);
+
+        Stage primaryStage = Main.getMainStage();
+
+        AdditionModel model = new AdditionModel();
+        AdditionController controller = new AdditionController(model);
+        AdditionView view = new AdditionView(controller, model);
+
+        Scene scene = new Scene(view.asParent(), 1500, 1000);
+        primaryStage.setScene(scene);
+        primaryStage.centerOnScreen();
+        primaryStage.show();
+        Main.setMainStage(primaryStage);
+    }
+
+
+}
diff --git a/src/LeaderBoard.fxml b/src/LeaderBoard.fxml
new file mode 100755
index 0000000..d8522fb
--- /dev/null
+++ b/src/LeaderBoard.fxml
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+<?import javafx.scene.text.Font?>
+
+<AnchorPane maxHeight="600.0" maxWidth="600.0" minHeight="600.0" minWidth="600.0" prefHeight="600.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.LeaderBoardController">
+   <children>
+      <ImageView fitHeight="584.0" fitWidth="681.0" layoutX="-81.0" pickOnBounds="true" preserveRatio="true">
+         <image>
+            <Image url="file:images/menu/snowy.png" />
+         </image>
+      </ImageView>
+      <Label layoutX="159.0" layoutY="110.0" text="1." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label layoutX="155.0" layoutY="176.0" text="2." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label layoutX="155.0" layoutY="245.0" text="3." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label fx:id="firstUsername" layoutX="218.0" layoutY="143.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label layoutX="218.0" layoutY="93.0" prefHeight="22.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="USERNAME" textFill="WHITE">
+         <font>
+            <Font size="17.0" />
+         </font>
+      </Label>
+      <Label layoutX="384.0" layoutY="93.0" style="-fx-background-color: FFA500;" text="SCORE" textFill="WHITE">
+         <font>
+            <Font size="17.0" />
+         </font>
+      </Label>
+      <Label layoutX="155.0" layoutY="316.0" text="4." textFill="WHITE">
+         <font>
+            <Font size="54.0" />
+         </font>
+      </Label>
+      <Label fx:id="firstScore" layoutX="380.0" layoutY="143.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="secondUsername" layoutX="218.0" layoutY="202.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="secondScore" layoutX="380.0" layoutY="202.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="thirdUsername" layoutX="218.0" layoutY="265.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="thirdScore" layoutX="380.0" layoutY="265.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="fourthUsername" layoutX="218.0" layoutY="336.0" prefHeight="26.0" prefWidth="145.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <Label fx:id="fourthScore" layoutX="380.0" layoutY="336.0" prefHeight="26.0" prefWidth="65.0" style="-fx-background-color: FFA500;" text="Label" textFill="WHITE">
+         <font>
+            <Font size="20.0" />
+         </font>
+      </Label>
+      <ImageView fx:id="backView" fitHeight="66.0" fitWidth="65.0" layoutX="503.0" layoutY="14.0" onMouseClicked="#backButtonHandle" pickOnBounds="true" preserveRatio="true" rotate="45.0">
+         <image>
+            <Image url="file:images/menu/Back.png" />
+         </image>
+      </ImageView>
+   </children>
+</AnchorPane>
diff --git a/src/LeaderBoardController.java b/src/LeaderBoardController.java
new file mode 100644
index 0000000..c5f570a
--- /dev/null
+++ b/src/LeaderBoardController.java
@@ -0,0 +1,102 @@
+package sample;
+import javafx.application.Application;
+import javafx.collections.FXCollections;
+import javafx.collections.ObservableList;
+import javafx.fxml.FXML;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.control.cell.PropertyValueFactory;
+import javafx.scene.image.ImageView;
+import javafx.stage.Stage;
+import javafx.scene.control.Button;
+import javafx.scene.control.*;
+import javafx.scene.control.TextArea;
+
+import java.io.IOException;
+
+public class LeaderBoardController {
+
+    public Button backButton;
+    ImageView backView;
+
+
+    private DatabaseManager database;
+    private User[] userArray;
+
+    @FXML
+    Label firstUsername, secondUsername, thirdUsername, fourthUsername, firstScore, secondScore, thirdScore, fourthScore;
+
+    @FXML
+    public void initialize(){
+
+        database = new DatabaseManager();
+        userArray = new User [100];
+
+        fillLeaderBoard();
+        sortUsers();
+
+        firstUsername.setText(userArray[0].getUsername());
+        secondUsername.setText(userArray[1].getUsername());
+        thirdUsername.setText(userArray[2].getUsername());
+        fourthUsername.setText(userArray[3].getUsername());
+
+        firstScore.setText(userArray[0].getScore() + "");
+        secondScore.setText(userArray[1].getScore() + "");
+        thirdScore.setText(userArray[2].getScore() + "");
+        fourthScore.setText(userArray[3].getScore() + "");
+
+
+    }
+
+    public void fillLeaderBoard(){
+        database.fillLeaderBoard(userArray);
+    }
+
+    public void printLeaderBoard(){
+        System.out.println("USERNAME" + "     " + "SCORE");
+        for(int i = 0; i < 100; i++){
+            if(userArray[i] != null) {
+                System.out.println(userArray[i].getUsername() + "     " + userArray[i].getScore());
+            }
+        }
+    }
+
+    public void sortUsers(){
+        //selection sort
+        int size = 0;
+        for(int i = 0; i < 100; i++){
+            if(userArray[i] != null){
+                size++;
+            }
+        }
+
+        System.out.println(size);
+
+        //now we know the actual size of array
+        for(int i = 0; i < size-1; i++){
+            int max_id = i;
+            for(int j = i+1; j < size; j++){
+                if(userArray[j].getScore() > userArray[max_id].getScore()){
+                    max_id = j;
+                }
+            }
+
+            User temp = userArray[max_id];
+            userArray[max_id] = userArray[i];
+            userArray[i] = temp;
+        }
+    }
+
+    public void backButtonHandle() throws IOException {
+
+        printLeaderBoard();
+
+        Parent root = FXMLLoader.load(getClass().getResource("mainMenu.fxml"));
+        Stage m = Main.getMainStage();
+        Scene t = Main.getMainStage().getScene();
+        t.setRoot(root);
+        m.setScene(t);
+        Main.setMainStage(m);
+    }
+}
\ No newline at end of file
diff --git a/src/Level.java b/src/Level.java
new file mode 100755
index 0000000..d256fb8
--- /dev/null
+++ b/src/Level.java
@@ -0,0 +1,94 @@
+package sample;
+
+import javafx.scene.image.ImageView;
+
+import java.awt.*;
+import java.lang.reflect.Array;
+import java.util.ArrayList;
+
+public class Level {
+    private int highScore;
+    private int time;
+    private int levelNo;
+    private boolean isUnlocked;
+    private int[][] levelMatrix;
+    private ImageView boardView;
+    private int elapsedTime;
+    private int extraScore;
+
+
+    ArrayList<Piece> unusedPieces;
+
+
+    public Level(int levelNo, int time, ArrayList<Piece>unusedPieces, int[][]levelMatrix, ImageView board){
+        boardView = board;
+        this.levelMatrix = levelMatrix;
+        this.levelNo = levelNo;
+        this.time = time;
+        highScore = 0;
+        this.unusedPieces = unusedPieces;
+        isUnlocked = false;
+        elapsedTime = 0;
+    }
+
+    public void setHighScore(int highScore){
+        if(this.highScore < highScore)
+            this.highScore = highScore;
+    }
+
+    public ImageView getBoardView(){
+        return boardView;
+    }
+    public int getTime(){
+        return time;
+    }
+
+    public int[][] getLevelMatrix(){
+        return levelMatrix;
+    }
+
+    public int getLevelNo(){
+        return levelNo;
+    }
+
+    public void setUnlocked(boolean lock){
+        isUnlocked = lock;
+    }
+
+    public boolean getUnlocked(){
+        return isUnlocked;
+    }
+
+    //bu metod levellarda kullanılacak piecelerin initial positionlarını ayarlar
+    public ArrayList<Piece> constructPiecePositions(){
+        ArrayList<Piece> list = new ArrayList<>();
+        return list;
+    }
+
+    public ArrayList<Piece> getUnusedPieces(){
+        return unusedPieces;
+    }
+
+    public void setElapsedTime(int time){
+        elapsedTime = time;
+    }
+    public int getElapsedTime(){
+        return elapsedTime;
+    }
+
+    public void incrementElapsedTime(){
+        elapsedTime++;
+    }
+    public int getHighScore(){return highScore; }
+
+    public boolean isTimeOver(){return (elapsedTime / 5) > time;}
+
+    public void setExtraScore(){
+        extraScore +=5;
+    }
+
+    public int getExtraScore(){
+        return extraScore;
+    }
+
+}
diff --git a/src/LoadGame.fxml b/src/LoadGame.fxml
new file mode 100755
index 0000000..49d92c1
--- /dev/null
+++ b/src/LoadGame.fxml
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Button?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+
+<AnchorPane maxHeight="600.0" maxWidth="600.0" minHeight="600.0" minWidth="600.0" prefHeight="600.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.LoadGameController">
+    <children>
+        <ImageView fx:id="backView" fitHeight="752.0" fitWidth="814.0" layoutX="-214.0" layoutY="-5.0" onMouseMoved="#refreshLevels" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/snowy.png" />
+            </image>
+        </ImageView>
+        <Button fx:id="backButton" layoutX="500.0" layoutY="28.0" mnemonicParsing="false" onAction="#backButtonHandle" prefHeight="31.0" prefWidth="73.0" text="Back" />
+        <ImageView fx:id="levelOneButton" fitHeight="79.0" fitWidth="73.0" layoutX="120.0" layoutY="103.0" onMouseClicked="#levelOneClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelOne.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelTwoButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="95.0" onMouseClicked="#levelTwoClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelTwoU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelThreeButton" fitHeight="98.0" fitWidth="73.0" layoutX="386.0" layoutY="95.0" onMouseClicked="#levelThreeClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelThreeU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelFiveButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="213.0" onMouseClicked="#levelFiveClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelFiveU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelEightButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="346.0" onMouseClicked="#levelEightClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelEightU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelSixButton" fitHeight="87.0" fitWidth="84.0" layoutX="386.0" layoutY="213.0" onMouseClicked="#levelSixClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelSixU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelNineButton" fitHeight="87.0" fitWidth="84.0" layoutX="386.0" layoutY="346.0" onMouseClicked="#levelNineClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelNineU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelSevenButton" fitHeight="87.0" fitWidth="84.0" layoutX="120.0" layoutY="346.0" onMouseClicked="#levelSevenClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levenSevenU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelFourButton" fitHeight="87.0" fitWidth="84.0" layoutX="120.0" layoutY="213.0" onMouseClicked="#levelFourClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelFourU.png" />
+            </image>
+        </ImageView>
+        <ImageView fx:id="levelTenButton" fitHeight="87.0" fitWidth="84.0" layoutX="249.0" layoutY="463.0" onMouseClicked="#levelTenClick" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/loadgame/levelTenU.png" />
+            </image>
+        </ImageView>
+    </children>
+</AnchorPane>
diff --git a/src/LoadGameController.java b/src/LoadGameController.java
new file mode 100755
index 0000000..c255e95
--- /dev/null
+++ b/src/LoadGameController.java
@@ -0,0 +1,251 @@
+package sample;
+import javafx.fxml.FXML;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.stage.Stage;
+import javafx.scene.control.Button;
+import sample.*;
+
+
+import java.io.IOException;
+
+public class LoadGameController{
+
+    Game game = Game.getInstance();
+
+    @FXML
+    public Button backButton;
+    @FXML
+    ImageView levelOneButton, backView, levelTwoButton, levelThreeButton, levelFourButton, levelFiveButton, levelSixButton, levelSevenButton, levelEightButton, levelNineButton, levelTenButton;
+
+    private ImageView[] buttons;
+    private int levelCount;
+
+
+    @FXML
+    public void initialize(){
+        Image[] unlockImages = new Image[10];
+        unlockImages[0] = new Image("file:images/loadgame/levelOne.png");
+        unlockImages[1] = new Image("file:images/loadgame/levelTwo.png");
+        unlockImages[2] = new Image("file:images/loadgame/levelThree.png");
+        unlockImages[3] = new Image("file:images/loadgame/levelFour.png");
+        unlockImages[4] = new Image("file:images/loadgame/levelFive.png");
+        unlockImages[5] = new Image("file:images/loadgame/levelSix.png");
+        unlockImages[6] = new Image("file:images/loadgame/levelSeven.png");
+        unlockImages[7] = new Image("file:images/loadgame/levelEight.png");
+        unlockImages[8] = new Image("file:images/loadgame/levelNine.png");
+        unlockImages[9] = new Image("file:images/loadgame/levelTen.png");
+
+
+        buttons = new ImageView[10];
+        buttons[0] = levelOneButton;
+        buttons[1] = levelTwoButton;
+        buttons[2] = levelThreeButton;
+        buttons[3] = levelFourButton;
+        buttons[4] = levelFiveButton;
+        buttons[5] = levelSixButton;
+        buttons[6] = levelSevenButton;
+        buttons[7] = levelEightButton;
+        buttons[8] = levelNineButton;
+        buttons[9] = levelTenButton;
+
+
+        levelCount = game.user.getLastPassedLevel();
+
+        for(int m = 0; m < levelCount; m++){
+            buttons[m].setImage(unlockImages[m]);
+        }
+    }
+
+
+    public void levelOneClick() throws IOException{
+            game.setCurrent2DLevel(0);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+    }
+
+    public void levelTwoClick() throws IOException{
+
+        if (levelCount > 0) {
+            game.setCurrent2DLevel(1);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+    }
+    public void levelThreeClick() throws IOException{
+
+        if (levelCount > 1) {
+            game.setCurrent2DLevel(2);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+    public void levelFourClick() throws IOException{
+
+        if (levelCount > 2) {
+            game.setCurrent2DLevel(3);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+    public void levelFiveClick() throws IOException{
+        if (levelCount > 3) {
+            game.setCurrent2DLevel(4);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+    public void levelSixClick() throws IOException{
+        if (levelCount > 4) {
+            game.setCurrent2DLevel(5);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+    public void levelSevenClick() throws IOException{
+        if (levelCount > 5) {
+            game.setCurrent2DLevel(6);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+    public void levelEightClick() throws IOException{
+        if (levelCount > 6) {
+            game.setCurrent2DLevel(7);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+    public void levelNineClick() throws IOException{
+        if (levelCount > 7) {
+            game.setCurrent2DLevel(8);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+    public void levelTenClick() throws IOException{
+        if (levelCount > 8) {
+            game.setCurrent2DLevel(9);
+            Stage primaryStage = Main.getMainStage();
+
+            AdditionModel model = new AdditionModel();
+            AdditionController controller = new AdditionController(model);
+            AdditionView view = new AdditionView(controller, model);
+
+            Scene scene = new Scene(view.asParent(), 1500, 1000);
+            primaryStage.setScene(scene);
+            primaryStage.centerOnScreen();
+            primaryStage.show();
+            Main.setMainStage(primaryStage);
+        }
+
+    }
+
+    public void backButtonHandle() throws IOException {
+        Parent root = FXMLLoader.load(getClass().getResource("mainMenu.fxml"));
+        Stage m = Main.getMainStage();
+        Scene t = Main.getMainStage().getScene();
+        t.setRoot(root);
+        m.setScene(t);
+        Main.setMainStage(m);
+    }
+
+    public void refreshLevels() throws IOException{
+        int i = game.getLastPassed2d();
+
+        for (int m = 0; m < i; m++){
+            //buttons[i].setImage()
+        }
+    }
+}
\ No newline at end of file
diff --git a/src/Main.java b/src/Main.java
new file mode 100755
index 0000000..c12712e
--- /dev/null
+++ b/src/Main.java
@@ -0,0 +1,247 @@
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package sample;
+
+import javafx.application.Application;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+
+import java.io.IOException;
+
+
+public class Main extends Application{
+
+    private static Stage mainStage;
+
+//----------------------------------------------------------------------------------------------------------------------
+/*//Puzlle piecelerinin dogru yerde oluip olmadigini kontrol eden fonksiyon degilse boardun boundarylerinin disindaysa
+//initial positiona geri donecek
+public boolean checkPieceBoundary(ImageView piece, double xPosition, double yPosition){
+
+    //Board Borders
+
+    //Boundary Locations
+    final int threshold = 10;
+    int xTopLeft = 40;
+    int yTopLeft = -468;
+    int xTopRight = 770;
+    int yTopRight = -468;
+    int xBottomLeft = 40;
+    int yBottomLeft = -194;
+    int xBottomRight = 770;
+    int yBottomRight = -194;
+
+    if((piece.getLayoutX() < xTopLeft - threshold) || (piece.getLayoutX() > xTopRight + threshold) || (piece.getLayoutY() > yBottomLeft + threshold) || (piece.getLayoutY() < yTopRight - threshold)) {
+        piece.setLayoutX(xPosition);
+        piece.setLayoutY(yPosition);
+        return false;
+    }
+    else {
+        return true;
+    }
+}
+
+*/
+
+//----------------------------------------------------------------------------------------------------------------------
+/*
+    //PIECEI BIRAZ DISARI KOYDUGUMUZDA PICECEI BOARDA FIX EDEN FONKSIYON
+    public void putPiece(ImageView piece, double [][]XboardMatrix, double [][]YboardMatrix, int [][]isFull) {
+
+        //Boundary Locations
+        final int threshold = 10;
+        int xTopLeft = 40;
+        int yTopLeft = -468;
+        int xTopRight = 770;
+        int yTopRight = -468;
+        int xBottomLeft = 40;
+        int yBottomLeft = -194;
+        int xBottomRight = 770;
+        int yBottomRight = -194;
+
+        //Boardun constructorinda initialize edilecek
+//        double [][]XboardMatrix = new double[5][11];
+//        double [][]YboardMatrix = new double[5][11];
+//
+//        int [][] isFull = new int[5][11];
+//
+//
+//        for(int i = 0; i < 5; i++) {
+//            for(int j =0; j < 11; j++) {
+//                XboardMatrix[i][j] = xTopLeft + (66.36)*j;
+//                YboardMatrix[i][j] = yTopLeft + (66.36)*i;
+//            }
+//        }
+
+        double piecePositionX = piece.getLayoutX();
+        double piecePositionY = piece.getLayoutY();
+
+        int indexX = (int) (piecePositionX / (66.36));
+        int indexY = (int) ((piecePositionY+468) / (66.36));
+
+        if(((piecePositionX > (XboardMatrix[indexY][indexX] - 10)) && (piecePositionX < (XboardMatrix[indexY][indexX] + 66.36)) && (((piecePositionY > (YboardMatrix[indexY][indexX] - 10)) && (piecePositionY < (YboardMatrix[indexY][indexX] + 66.36)))))){
+
+            System.out.println(indexX);
+            System.out.println(indexY);
+
+            piece.setLayoutX(XboardMatrix[indexY][indexX] + 3);
+            piece.setLayoutY(YboardMatrix[indexY][indexX] + 13);
+            isFull[indexY][indexX] = 1;
+
+        }
+
+    }
+*/
+//----------------------------------------------------------------------------------------------------------------------
+
+    @Override
+    public void start(Stage primaryStage) throws IOException {
+        mainStage = primaryStage;
+        /*
+        BorderPane backgroundPane = new BorderPane();
+        GridPane boardPane = new GridPane();
+        HBox menuPane = new HBox();
+        menuPane.setMinSize(150,150);
+        menuPane.setMaxSize(150, 150);
+        Button pauseButton = new Button("Pause");
+        menuPane.getChildren().addAll(pauseButton);
+        // use it's predefined content pane as pieceBox pane
+        Pane pieceBox = new Pane();
+        pieceBox.setMaxSize(600, 600);
+
+        //Adding board images, and pieces
+        Image piece = new Image("file:/Users/safaaskin/IdeaProjects/Deneme/images/piece10.png");
+        Image piece2 = new Image("file:/Users/safaaskin/IdeaProjects/Deneme/images/piece11.png");
+        // Image boardImage = new Image("file:/Users/safaaskin/IdeaProjects/Deneme/images/boardpic.png");
+
+        //ImageView boardView = new ImageView(boardImage);
+        ImageView pieceView= new ImageView(piece);
+        ImageView piece2View = new ImageView(piece2);
+
+
+       pieceView.setFitHeight(66.36);
+        pieceView.setFitWidth(66.36);
+        piece2View.setFitHeight(66.36);
+        piece2View.setFitWidth(66.36);
+
+        MouseControlUtil.makeDraggable(pieceView);
+        pieceBox.getChildren().add(pieceView);
+
+        MouseControlUtil.makeDraggable(piece2View);
+        pieceBox.getChildren().add(piece2View);
+
+        pieceView.setLayoutX(40);
+        pieceView.setLayoutY(40);
+        piece2View.setLayoutX(100);
+        piece2View.setLayoutY(40);
+
+
+//----------------------------------------------------------------------------------------------------------------------
+
+        //BOARD MATRIXI INITIALIZE EDILIYOR VE BIR MATRIX XPOSITIONLARI TUTUYOR BIR MATRIX YPOSITIONLARI TUTUYOR
+        //BIR MATRIX TUM BOARD ENTRYLERININ BOS OLUP OLMADIGINI TUTUYOR
+
+        //Boardun constructorinda initialize edilecek
+        int xTopLeft = 40;
+        int yTopLeft = -468;
+
+        double [][]XboardMatrix = new double[5][11];
+        double [][]YboardMatrix = new double[5][11];
+
+        int [][] isFull = new int[5][11];
+
+
+        for(int i = 0; i < 5; i++) {
+            for(int j =0; j < 11; j++) {
+                XboardMatrix[i][j] = xTopLeft + (66.36)*j;
+                YboardMatrix[i][j] = yTopLeft + (66.36)*i;
+            }
+        }
+
+        //Piece classinda release count olacak
+        int pieceCount = 2;
+        int [] pieceDragCounter = new int [pieceCount]; // We have 2 pieces for now
+
+//--------------------------------------------------------------------------------------------------
+
+        //MOUSE RELEASED EVENT HANDLER
+        //This code calculates the position of piece
+        EventHandler handler = new EventHandler() {
+            @Override
+            public void handle(Event event) {
+
+                //if(event.getSource())
+
+
+
+                System.out.println("X: " +pieceView.getLayoutX());
+                System.out.println("Y: " +pieceView.getLayoutY());
+
+                if(board.checkPieceBoundary(pieceView, 40, 40)) {
+                    putPiece(pieceView, XboardMatrix, YboardMatrix, isFull);
+                }
+
+                if(board.checkPieceBoundary(piece2View, 100, 40))
+                    putPiece(piece2View, XboardMatrix, YboardMatrix, isFull);
+
+                for(int i = 0; i < 5; i++) {
+                    for(int j =0; j < 11; j++) {
+                        System.out.print(isFull[i][j]);
+                    }
+                    System.out.println();
+                }
+            }
+        };
+
+//--------------------------------------------------------------------------------------------------
+
+        //ADDING EVENTHANDLER TO PIECES
+        pieceView.addEventHandler(MouseEvent.MOUSE_RELEASED, handler);
+        piece2View.addEventHandler(MouseEvent.MOUSE_RELEASED, handler);
+
+//--------------------------------------------------------------------------------------------------
+
+        //SETTING THE PANE
+        board.getBoardView().setFitHeight(400);
+        board.getBoardView().setFitWidth(800);
+        board.getBoardView().setLayoutX(200);
+        board.getBoardView().setLayoutY(400);
+
+        pieceBox.setMaxSize(300, 300);
+        pieceBox.setMinSize(300,300);
+
+        String style = "-fx-background-color: rgba(193, 66, 66, 0.8);";
+        backgroundPane.setStyle(style);
+        boardPane.getChildren().addAll(board.getBoardView());
+        backgroundPane.setCenter(boardPane);
+        backgroundPane.setBottom(pieceBox);
+        backgroundPane.setTop(menuPane);
+
+//--------------------------------------------------------------------------------------------------
+        */
+
+        //Parent root = FXMLLoader.load(getClass().getResource("GamePlayController.fxml"));
+        Parent root = FXMLLoader.load(getClass().getResource("logInScreen.fxml"));
+        mainStage.setScene(new Scene(root));
+        mainStage.show();
+
+    }
+
+    public static void main(String[] args) {
+        launch(args);
+    }
+
+
+    public static void setMainStage(Stage stage) {
+        Main.mainStage = stage;
+    }
+
+    public static Stage getMainStage() {
+        return mainStage;
+    }
+
+}
\ No newline at end of file
diff --git a/out/production/Version2IQ/sample/NewGame.fxml b/src/NewGame.fxml
old mode 100644
new mode 100755
similarity index 70%
copy from out/production/Version2IQ/sample/NewGame.fxml
copy to src/NewGame.fxml
index c1b7fc1..eb09aca
--- a/out/production/Version2IQ/sample/NewGame.fxml
+++ b/src/NewGame.fxml
@@ -8,32 +8,32 @@
    <children>
       <ImageView fitHeight="600.0" fitWidth="859.0" layoutX="-147.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/snowy.png" />
+            <Image url="file:images/menu/snowy.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="622.0" fitWidth="460.0" layoutX="57.0" layoutY="59.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Menu_Base.png" />
+            <Image url="file:images/menu/Menu_Base.png" />
          </image>
       </ImageView>
       <ImageView fx:id="twoD" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="274.0" onMousePressed="#twoDHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/2DGame.png" />
+            <Image url="file:images/menu/2DGame.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="369.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/3DGame.png" />
+            <Image url="file:images/menu/3DGame.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="213.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/ChooseMode.png" />
+            <Image url="file:images/menu/ChooseMode.png" />
          </image>
       </ImageView>
       <ImageView fx:id="backImage" fitHeight="150.0" fitWidth="50.0" layoutX="492.0" layoutY="33.0" onMousePressed="#backButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Back.png" />
+            <Image url="file:images/menu/Back.png" />
          </image>
       </ImageView>
    </children>
diff --git a/src/NewGameController.java b/src/NewGameController.java
new file mode 100755
index 0000000..2f52c49
--- /dev/null
+++ b/src/NewGameController.java
@@ -0,0 +1,48 @@
+package sample;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.stage.Stage;
+import sample.AdditionController;
+import sample.AdditionModel;
+import sample.AdditionView;
+import sample.Main;
+
+import javax.swing.text.html.ImageView;
+import java.io.IOException;
+
+public class NewGameController {
+
+
+    ImageView twoD, backImage;
+
+
+    public void backButtonHandle() throws IOException {
+
+        Parent root = FXMLLoader.load(getClass().getResource("mainMenu.fxml"));
+        Stage m = Main.getMainStage();
+        Scene t = Main.getMainStage().getScene();
+        t.setRoot(root);
+        m.setScene(t);
+        Main.setMainStage(m);
+    }
+
+    public void twoDHandle() throws IOException {
+        Stage primaryStage = Main.getMainStage();
+
+        AdditionModel model = new AdditionModel();
+        AdditionController controller = new AdditionController(model);
+        AdditionView view = new AdditionView(controller, model);
+
+        Scene scene = new Scene(view.asParent(), 1500, 1000);
+        primaryStage.setScene(scene);
+        primaryStage.centerOnScreen();
+        primaryStage.show();
+        Main.setMainStage(primaryStage);
+    }
+
+    public void threeDCheckBoxHandle() throws IOException {
+
+    }
+
+}
diff --git a/out/production/Version2IQ/sample/PauseAlertBox.fxml b/src/PauseAlertBox.fxml
old mode 100644
new mode 100755
similarity index 65%
copy from out/production/Version2IQ/sample/PauseAlertBox.fxml
copy to src/PauseAlertBox.fxml
index 8a3c2c0..48ef4f9
--- a/out/production/Version2IQ/sample/PauseAlertBox.fxml
+++ b/src/PauseAlertBox.fxml
@@ -9,32 +9,32 @@
    <children>
       <ImageView fitHeight="451.0" fitWidth="621.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/FinishScreen.png" />
+            <Image url="file:images/menu/FinishScreen.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="84.0" fitWidth="384.0" layoutX="129.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Ribbon.png" />
+            <Image url="file:images/menu/Ribbon.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="150.0" fitWidth="200.0" layoutX="221.0" layoutY="52.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Congraculations.png" />
+            <Image url="file:images/menu/Congraculations.png" />
          </image>
       </ImageView>
-      <ImageView fitHeight="160.0" fitWidth="284.0" layoutX="179.0" layoutY="124.0" pickOnBounds="true" preserveRatio="true">
+      <ImageView fx:id="starView" fitHeight="160.0" fitWidth="284.0" layoutX="179.0" layoutY="124.0" onMouseMoved="#calculateScore" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/threeStar.png" />
+            <Image url="file:images/menu/OneStar.png" />
          </image>
       </ImageView>
       <ImageView fx:id="nextView" fitHeight="90.0" fitWidth="125.0" layoutX="348.0" layoutY="277.0" onMousePressed="#nextLevelButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/DoneButton.png" />
+            <Image url="file:images/menu/DoneButton.png" />
          </image>
       </ImageView>
       <ImageView fx:id="replayView" fitHeight="90.0" fitWidth="125.0" layoutX="208.0" layoutY="277.0" onMousePressed="#replayButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/ReplayButton.png" />
+            <Image url="file:images/menu/ReplayButton.png" />
          </image>
       </ImageView>
       <Label layoutX="377.0" layoutY="367.0" text="Next" />
diff --git a/src/PauseAlertBox.java b/src/PauseAlertBox.java
new file mode 100755
index 0000000..3ef00f0
--- /dev/null
+++ b/src/PauseAlertBox.java
@@ -0,0 +1,83 @@
+package sample;
+import javafx.application.Platform;
+import javafx.fxml.FXML;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.image.Image;
+import javafx.scene.image.ImageView;
+import javafx.stage.*;
+import javafx.scene.*;
+import javafx.scene.layout.*;
+import javafx.scene.control.*;
+
+import javax.annotation.processing.Generated;
+import java.io.IOException;
+import java.util.concurrent.TimeUnit;
+
+
+public class PauseAlertBox {
+
+
+
+    @FXML
+    ImageView replayView, nextView, starView;
+    Game game  = Game.getInstance();
+
+
+    @FXML
+    public void initialize(){
+        int score = game.twoDLevels[game.getCurrent2DLevel() - 1].getHighScore();
+
+        if(score >= 30)
+            starView.setImage(new Image("file:images/menu/threeStar.png"));
+        else if(score >= 20)
+            starView.setImage(new Image("file:images/menu/twoStar.png"));
+    }
+
+    public void display() throws IOException {
+
+    }
+
+    public void replayButtonHandle() throws IOException {
+        Game.setInstance(game);
+        game.replayLevel();
+
+        Stage primaryStage = Main.getMainStage();
+        AdditionModel modelFirst = new AdditionModel();
+        AdditionController controllerFirst = new AdditionController(modelFirst);
+        AdditionView viewFirst = new AdditionView(controllerFirst, modelFirst);
+
+        Scene scene = new Scene(viewFirst.asParent(), 1500, 1000);
+        primaryStage.setScene(scene);
+        primaryStage.centerOnScreen();
+        primaryStage.show();
+        Main.setMainStage(primaryStage);
+    }
+
+    public void calculateScore() throws IOException {
+
+    }
+
+    public void nextLevelButtonHandle() throws IOException {
+
+        Stage primaryStage = Main.getMainStage();
+
+        AdditionModel model = new AdditionModel();
+        AdditionController controller = new AdditionController(model);
+        AdditionView view = new AdditionView(controller, model);
+
+        Scene scene = new Scene(view.asParent(), 1500, 1000);
+        primaryStage.setScene(scene);
+        primaryStage.centerOnScreen();
+        primaryStage.show();
+        Main.setMainStage(primaryStage);
+
+    }
+
+
+    public void exitButtonHandle() throws IOException {
+        Platform.exit();
+    }
+
+
+
+}
diff --git a/src/Piece.java b/src/Piece.java
new file mode 100755
index 0000000..af35691
--- /dev/null
+++ b/src/Piece.java
@@ -0,0 +1,220 @@
+package sample;
+
+
+import javafx.scene.canvas.GraphicsContext;
+import javafx.scene.image.ImageView;
+import javafx.scene.transform.Rotate;
+import javafx.scene.transform.Translate;
+
+public class Piece {
+    final int WIDHT = 20;
+    final int HEIGHT = 10;
+
+    private int positionX;
+    private int positionY;
+    private int pieceId;
+    private ImageView[] images;
+    private int rotation;
+    private boolean isUsed;
+    private ImageView currentImage;
+    private int[][] matrix;
+    int rotationCount;
+
+
+    public Piece(int pieceId, ImageView image, int[][] matrix){
+        this.matrix = matrix;
+        //this.images = images;
+        rotation = 0;
+        currentImage  = image;
+        isUsed = true;
+        this.positionX = 0;
+        this.positionY = 0;
+        this.pieceId = pieceId;
+        rotationCount = 0;
+    }
+
+    public ImageView getCurrentImage() {
+        return currentImage;
+    }
+
+    public void rotateLeft(){
+        rotation--;
+        currentImage = images[rotation];
+        rotateMatrixLeft();
+    }
+
+    public void rotateRight(){
+        rotation++;
+        currentImage = images[rotation];
+        rotateMatrixRight();
+    }
+
+    public void rotateMatrixLeft(){
+//        System.out.println("BEFORE: ");
+//
+//        for(int i = 0; i < 4; i++) {
+//            for(int j = 0; j < 4; j++) {
+//
+//                System.out.print(this.matrix[i][j]);
+//                System.out.print(" ");
+//            }
+//            System.out.println();
+//        }
+
+        swapRows();
+        transpose();
+        System.out.println("AFTER: ");
+
+        for(int i = 0; i < 4; i++) {
+            for(int j = 0; j < 4; j++) {
+
+                System.out.print(this.matrix[i][j]);
+                System.out.print(" ");
+            }
+            System.out.println();
+        }
+//
+//        for(int i = 0; i < 3; i++) {
+//            shiftLeftMost(this.matrix);
+//        }
+//
+//        System.out.println("AFTER SHIFT LEFT");
+//        for(int i = 0; i < 4; i++) {
+//            for(int j = 0; j < 4; j++) {
+//
+//                System.out.print(matrix[i][j]);
+//                System.out.print(" ");
+//            }
+//            System.out.println();
+//        }
+//
+//        for(int i = 0; i < 3; i++) {
+//            shiftUpMost(this.matrix);
+//        }
+//        System.out.println("AFTER SHIFT UP");
+
+    }
+
+
+    public void rotateMatrixRight(){
+
+    }
+
+    private void transpose() {
+
+        for (int i = 0; i < matrix.length; i++) {
+            for (int j = i; j < matrix[0].length; j++) {
+                int x = matrix[i][j];
+                matrix[i][j] = matrix[j][i];
+                matrix[j][i] = x;
+            }
+        }
+    }
+
+    public void swapRows() {
+        for (int  i = 0, k = matrix.length - 1; i < k; ++i, --k) {
+            int[] x = matrix[i];
+            matrix[i] = matrix[k];
+            matrix[k] = x;
+        }
+    }
+
+    public void shiftLeftMost(int [][]matrix) {
+
+        System.out.println("BEFORE SHIFTLEFT");
+
+        boolean oneObserved = false;
+
+        for(int i = 0; i < 4; i++) {
+
+            if(matrix[i][0] == 1) {
+                oneObserved = true;
+            }
+        }
+
+        if(!oneObserved) {
+            for(int i = 0; i < 4; i++) {
+                for(int j = 0; j < 3; j++) {
+                    matrix[i][j] = matrix[i][j + 1];
+                }
+            }
+            matrix[3][3] = 0;
+            matrix[0][3] = 0;
+            matrix[1][3] = 0;
+            matrix[2][3] = 0;
+        }
+    }
+
+    public void shiftUpMost(int [][]matrix) {
+
+        System.out.println("BEFORE UPMOST");
+
+        boolean oneObserved = false;
+
+        for(int i = 0; i < 4; i++) {
+
+            if(matrix[0][i] == 1) {
+                oneObserved = true;
+            }
+        }
+
+        if(!oneObserved) {
+            for(int i = 0; i < 3; i++) {
+                for(int j = 0; j < 4; j++) {
+                    matrix[i][j] = matrix[i+ 1][j];
+                }
+            }
+            matrix[3][3] = 0;
+            matrix[3][2] = 0;
+            matrix[3][1] = 0;
+            matrix[3][0] = 0;
+        }
+
+    }
+
+    public void verticalMirror() {
+
+        int [][] tempArray = new int [4][4];
+
+        for(int i = 0; i <= 3; i++) {
+
+            for(int j = 0; j <= 3; j++) {
+
+                tempArray[i][3-j] = this.matrix[i][j];
+            }
+        }
+
+        this.matrix = tempArray;
+
+        System.out.println("IN VERTICAL");
+        for(int i = 0; i < 4; i++) {
+            for (int j = 0; j < 4; j++) {
+
+                System.out.print(this.matrix[i][j]);
+                System.out.print(" ");
+            }
+            System.out.println();
+        }
+
+      //  Matrix matrix = new Matrix;
+
+    }
+
+    public void incrementRotationCount() {
+        this.rotationCount++;
+    }
+
+    public int getRotationCount() {
+        return this.rotationCount;
+    }
+
+    //Sonradan eklendi
+    public int [][] getMatrix() {
+        return matrix;
+    }
+
+    public int getPieceId() {
+        return this.pieceId;
+    }
+
+}
diff --git a/out/production/Version2IQ/sample/TutorialScreen.fxml b/src/TutorialScreen.fxml
old mode 100644
new mode 100755
similarity index 100%
copy from out/production/Version2IQ/sample/TutorialScreen.fxml
copy to src/TutorialScreen.fxml
diff --git a/src/TutorialScreenController.java b/src/TutorialScreenController.java
new file mode 100755
index 0000000..af94fd6
--- /dev/null
+++ b/src/TutorialScreenController.java
@@ -0,0 +1,4 @@
+package sample;
+
+public class TutorialScreenController {
+}
diff --git a/src/User.java b/src/User.java
new file mode 100644
index 0000000..11a5a40
--- /dev/null
+++ b/src/User.java
@@ -0,0 +1,65 @@
+package sample;
+
+public class User {
+
+    //User variables
+
+    String username;
+    //String password;
+
+    int score;
+    int lastPassedLevel;
+    int currentLevel;
+
+    int []passedTwoDimLevels;
+    int []passedThreeDimLevels;
+
+    //Constructor
+    public User() {
+        username = "";
+        score = 0;
+        lastPassedLevel = 0;
+        currentLevel = 0;
+    }
+
+    public String getUsername() {
+        return this.username;
+    }
+
+    public void setUsername(String username) {
+        this.username = username;
+    }
+
+    public int getScore() {
+        return this.score;
+    }
+
+    public void setScore(int score) {
+        this.score = score;
+    }
+
+    public int[] getPassedTwoDimLevels() {
+        return this.passedTwoDimLevels;
+    }
+
+    public void setPassedTwoDimLevels(int[] passedTwoDimLevels) {
+        this.passedTwoDimLevels = passedTwoDimLevels;
+    }
+
+    public int getLastPassedLevel() {
+        return this.lastPassedLevel;
+    }
+
+    public void setLastPassedLevel(int lastPassedLevel) {
+        this.lastPassedLevel = lastPassedLevel;
+    }
+
+    public int getCurrentLevel() {
+        return this.currentLevel;
+    }
+
+    public void setCurrentLevel(int currentLevel){
+        this.currentLevel = currentLevel;
+    }
+
+}
diff --git a/out/production/Version2IQ/sample/logInScreen.fxml b/src/logInScreen.fxml
old mode 100644
new mode 100755
similarity index 82%
copy from out/production/Version2IQ/sample/logInScreen.fxml
copy to src/logInScreen.fxml
index cbf1288..6c26b21
--- a/out/production/Version2IQ/sample/logInScreen.fxml
+++ b/src/logInScreen.fxml
@@ -14,24 +14,24 @@
     <children>
       <ImageView fitHeight="580.0" fitWidth="659.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/snowy.png" />
+            <Image url="file:images/menu/snowy.png" />
          </image>
       </ImageView>
         <TextField fx:id="userNameTextField" layoutX="193.0" layoutY="228.0" prefHeight="39.0" prefWidth="223.0" promptText="Username" />
       <PasswordField fx:id="passwordTextField" layoutX="193.0" layoutY="303.0" prefHeight="39.0" prefWidth="223.0" promptText="Password" />
       <ImageView fitHeight="145.0" fitWidth="292.0" layoutX="208.0" layoutY="78.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/IQPuzzler.png" />
+            <Image url="file:images/menu/IQPuzzler.png" />
          </image>
       </ImageView>
       <ImageView fx:id="loginView" fitHeight="39.0" fitWidth="109.0" layoutX="431.0" layoutY="228.0" onMousePressed="#signInButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/login.png" />
+            <Image url="file:images/menu/login.png" />
          </image>
       </ImageView>
       <ImageView fx:id="logupView" fitHeight="47.0" fitWidth="104.0" layoutX="431.0" layoutY="303.0" onMousePressed="#signUpButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/logup.png" />
+            <Image url="file:images/menu/logup.png" />
          </image>
       </ImageView>
     </children>
diff --git a/src/logInScreenController.java b/src/logInScreenController.java
new file mode 100755
index 0000000..6e3cf69
--- /dev/null
+++ b/src/logInScreenController.java
@@ -0,0 +1,53 @@
+package sample;
+
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.image.ImageView;
+import javafx.stage.Stage;
+import javafx.scene.control.Button;
+import javafx.scene.control.*;
+import sample.DatabaseManager;
+import sample.Main;
+
+
+import java.io.IOException;
+
+public class logInScreenController {
+    public Button signInButton, signUpButton;
+    public  TextField userNameTextField, passwordTextField;
+    ImageView loginView, logupView;
+
+    public ImageView image;
+
+    DatabaseManager database = new DatabaseManager();
+
+    public void signInButtonHandle()throws IOException{
+        //set scene to main menu
+
+        //check if successful login
+        String username = userNameTextField.getText();
+        String password = passwordTextField.getText();
+
+        if(database.logIn(username, password)) {
+            //if login is successful
+            Parent root = FXMLLoader.load(getClass().getResource("mainMenu.fxml"));
+            Stage m = Main.getMainStage();
+            Scene t = new Scene(root);
+            t.setRoot(root);
+            m.setScene(t);
+            Main.setMainStage(m);
+        }
+    }
+
+    public void signUpButtonHandle() throws IOException {
+        //set scene to sign up screen
+        Parent root = FXMLLoader.load(getClass().getResource("signUp.fxml"));
+        Stage m = Main.getMainStage();
+        Scene t = new Scene(root, 600, 600);
+        t.setRoot(root);
+        m.setScene(t);
+        Main.setMainStage(m);
+    }
+
+}
diff --git a/out/production/Version2IQ/sample/mainMenu.fxml b/src/mainMenu.fxml
old mode 100644
new mode 100755
similarity index 72%
copy from out/production/Version2IQ/sample/mainMenu.fxml
copy to src/mainMenu.fxml
index cd796e7..679fddc
--- a/out/production/Version2IQ/sample/mainMenu.fxml
+++ b/src/mainMenu.fxml
@@ -9,38 +9,38 @@
    <children>
       <ImageView fitHeight="670.0" fitWidth="805.0" layoutX="-205.0" layoutY="-2.0" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/snowy.png" />
+            <Image url="file:images/menu/snowy.png" />
          </image>
       </ImageView>
       <ImageView fitHeight="622.0" fitWidth="460.0" layoutX="57.0" layoutY="59.0" onMouseClicked="#newGameButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Menu_Base.png" />
+            <Image url="file:images/menu/Menu_Base.png" />
          </image>
       </ImageView>
       <Group layoutX="8.0" layoutY="-18.0" />
       <ImageView fx:id="PlayView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="176.0" onMousePressed="#newGameButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image> 
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/YellowFirst.png" />
+            <Image url="file:images/menu/YellowFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="tutorialView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="344.0" onMousePressed="#tutorialButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/BlueFirst.png" />
+            <Image url="file:images/menu/BlueFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="LoadView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="257.0" onMousePressed="#loadGameButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/GreenFirst.png" />
+            <Image url="file:images/menu/GreenFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="LeaderView" fitHeight="150.0" fitWidth="200.0" layoutX="187.0" layoutY="429.0" onMousePressed="#leaderBoardButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/GreyFirst.png" />
+            <Image url="file:images/menu/GreyFirst.png" />
          </image>
       </ImageView>
       <ImageView fx:id="backView" fitHeight="60.0" fitWidth="50.0" layoutX="506.0" layoutY="26.0" onKeyPressed="#backButtonHandle" pickOnBounds="true" preserveRatio="true">
          <image>
-            <Image url="file:/Users/alper/Desktop/Version2IQNude 3/Version2IQNude 3/images/menu/Back.png" />
+            <Image url="file:images/menu/Back.png" />
          </image>
       </ImageView>
    </children>
diff --git a/src/mainMenuController.java b/src/mainMenuController.java
new file mode 100755
index 0000000..a6a4e1f
--- /dev/null
+++ b/src/mainMenuController.java
@@ -0,0 +1,70 @@
+package sample;

+

+import javafx.fxml.FXMLLoader;

+import javafx.scene.Parent;

+import javafx.scene.Scene;

+import javafx.stage.Stage;

+import javafx.scene.control.Button;

+import sample.Main;

+

+

+import javax.swing.text.html.ImageView;

+import java.io.IOException;

+

+public class mainMenuController {

+     public Button newGameButton, loadGameButton, leaderBoardButton, tutorialButton, backButton;

+     ImageView PlayView, LoadView, tutorialView, LeaderView, backView;

+

+    public void newGameButtonHandle() throws IOException{

+

+        Parent root = FXMLLoader.load(getClass().getResource("NewGame.fxml"));

+        Stage m = Main.getMainStage();

+        Scene t = Main.getMainStage().getScene();

+        t.setRoot(root);

+        m.setScene(t);

+        Main.setMainStage(m);

+    }

+

+    public void loadGameButtonHandle() throws IOException{

+

+        Parent root = FXMLLoader.load(getClass().getResource("LoadGame.fxml"));

+        Stage m = Main.getMainStage();

+        Scene t = Main.getMainStage().getScene();

+        t.setRoot(root);

+        m.setScene(t);

+        Main.setMainStage(m);

+

+    }

+

+    public void leaderBoardButtonHandle() throws IOException{

+

+        Parent root = FXMLLoader.load(getClass().getResource("LeaderBoard.fxml"));

+        Stage m = Main.getMainStage();

+        Scene t = Main.getMainStage().getScene();

+        t.setRoot(root);

+        m.setScene(t);

+        Main.setMainStage(m);

+    }

+

+    public void backButtonHandle() throws IOException {

+        Parent root = FXMLLoader.load(getClass().getResource("logInScreen.fxml"));

+        Stage m = Main.getMainStage();

+        Scene t = Main.getMainStage().getScene();

+        t.setRoot(root);

+        m.setScene(t);

+        Main.setMainStage(m);

+    }

+

+

+    public void tutorialButtonHandle() throws  IOException{

+        //DISPLAY TUTORIAL IMAGES OR VIDEO

+        Parent root = FXMLLoader.load(getClass().getResource("TutorialScreen.fxml"));

+        Stage m = Main.getMainStage();

+        Scene t = Main.getMainStage().getScene();

+        t.setRoot(root);

+        m.setScene(t);

+        Main.setMainStage(m);

+

+    }

+

+}

diff --git a/out/production/Version2IQ/sample/sample.fxml b/src/sample.fxml
old mode 100644
new mode 100755
similarity index 100%
copy from out/production/Version2IQ/sample/sample.fxml
copy to src/sample.fxml
diff --git a/src/signUp.fxml b/src/signUp.fxml
new file mode 100755
index 0000000..206530a
--- /dev/null
+++ b/src/signUp.fxml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<?import javafx.scene.control.Button?>
+<?import javafx.scene.control.Label?>
+<?import javafx.scene.control.TextField?>
+<?import javafx.scene.image.Image?>
+<?import javafx.scene.image.ImageView?>
+<?import javafx.scene.layout.AnchorPane?>
+<?import javafx.scene.text.Font?>
+
+<AnchorPane maxHeight="600.0" maxWidth="600.0" minHeight="600.0" prefHeight="600.0" prefWidth="600.0" style="-fx-background-color: #E5F4F4;" xmlns="http://javafx.com/javafx/10.0.1" xmlns:fx="http://javafx.com/fxml/1" fx:controller="sample.signUpController">
+    <children>
+        <ImageView fitHeight="600.0" fitWidth="600.0" layoutX="3.0" layoutY="6.0" pickOnBounds="true" preserveRatio="true">
+            <image>
+                <Image url="file:images/menu/snowy.png" />
+            </image>
+        </ImageView>
+        <TextField fx:id="usernameField" layoutX="286.0" layoutY="209.0" prefHeight="41.0" prefWidth="198.0" />
+        <TextField fx:id="passwordField" layoutX="286.0" layoutY="280.0" prefHeight="41.0" prefWidth="198.0" />
+        <Button fx:id="signUpButton" layoutX="235.0" layoutY="379.0" mnemonicParsing="false" onAction="#signUpButtonHandle" prefHeight="50.0" prefWidth="122.0" text="Sign Up" textFill="#222121" />
+        <Button fx:id="backButton" layoutX="500.0" layoutY="28.0" mnemonicParsing="false" onAction="#backButtonHandle" prefHeight="31.0" prefWidth="73.0" text="Back" />
+        <Label alignment="CENTER" layoutX="212.0" layoutY="107.0" prefHeight="50.0" prefWidth="168.0" style="-fx-background-color: #FFA500;" text="Sign Up" textFill="#f8f7f7">
+            <font>
+                <Font size="36.0" />
+            </font>
+        </Label>
+        <Label alignment="CENTER" layoutX="129.0" layoutY="214.0" prefHeight="31.0" prefWidth="122.0" style="-fx-background-color: #FFA500;" text="Username" textFill="#f8f7f7">
+            <font>
+                <Font size="18.0" />
+            </font>
+        </Label>
+        <Label alignment="CENTER" layoutX="129.0" layoutY="285.0" prefHeight="31.0" prefWidth="122.0" style="-fx-background-color: #FFA500;" text="Password" textFill="#f8f7f7">
+            <font>
+                <Font size="18.0" />
+            </font>
+        </Label>
+    </children>
+</AnchorPane>
diff --git a/src/signUpController.java b/src/signUpController.java
new file mode 100755
index 0000000..0cdcae0
--- /dev/null
+++ b/src/signUpController.java
@@ -0,0 +1,58 @@
+package sample;
+
+import javafx.event.ActionEvent;
+import javafx.fxml.FXMLLoader;
+import javafx.scene.Parent;
+import javafx.scene.Scene;
+import javafx.scene.control.TextField;
+import javafx.stage.Stage;
+import javafx.scene.control.Button;
+import sample.DatabaseManager;
+import sample.Main;
+
+
+import java.io.IOException;
+
+public class signUpController {
+
+    public Button backButton;
+    public Button signUpButton;
+    public TextField usernameField;
+    public TextField passwordField;
+    DatabaseManager database = new DatabaseManager();
+
+    public void signUpButtonHandle(ActionEvent event) throws IOException{
+        //if the sign up button is pressed
+        String username = usernameField.getText();
+        String password = passwordField.getText();
+
+        if(username != "" && password != ""){
+            //check if user present in database
+            if(database.registerUser(username, password)){
+                //register user is successful
+                System.out.println("User sign up is successful");
+                //identify user !!
+                //go to main menu after successful sign up
+                Parent root = FXMLLoader.load(getClass().getResource("mainMenu.fxml"));
+                Stage m = Main.getMainStage();
+                Scene t = new Scene(root);
+                t.setRoot(root);
+                m.setScene(t);
+                Main.setMainStage(m);
+
+            }
+
+        }
+    }
+
+
+    public void backButtonHandle() throws IOException {
+
+        Parent root = FXMLLoader.load(getClass().getResource("logInScreen.fxml"));
+        Stage m = Main.getMainStage();
+        Scene t = Main.getMainStage().getScene();
+        t.setRoot(root);
+        m.setScene(t);
+        Main.setMainStage(m);
+    }
+}
\ No newline at end of file