lab 1,2 for review
diff --git a/src/sample/ArtRico.java b/src/sample/ArtRico.java
index 6bcba10..0c1d8c4 100644
--- a/src/sample/ArtRico.java
+++ b/src/sample/ArtRico.java
@@ -8,8 +8,6 @@
 import javafx.scene.control.Button;
 import javafx.scene.control.Label;
 import javafx.scene.input.KeyEvent;
-import javafx.scene.layout.Background;
-import javafx.scene.layout.BackgroundFill;
 import javafx.scene.layout.Pane;
 import javafx.scene.paint.Color;
 import javafx.scene.shape.Rectangle;
@@ -19,308 +17,308 @@
 import java.util.HashSet;
 
 public class ArtRico extends Application {
-	final int sceneWidth = 1280;
-	final int sceneHeight = 640;
-	final int wallWidth = 10;
-	final int strokeWidth = 2;
-	final int topHeight = 30;
-	final int bottomHeight = 10;
-	final int playerHeight = 20;
-	final int playerPosY = 570;
-	final int playerWidthEasy = 280;
-	final int playerWidthMedium = 200;
-	final int playerWidthHard = 200;
-	final int playerSpeedEasy = 10;
-	final int playerSpeedMedium = 10;
-	final int playerSpeedHard = 20;
-	final int ballSpeedEasy = 5;
-	final int ballSpeedMedium = 5;
-	final int ballSpeedHard = 10;
-	final int ballSize = 20;
-	final int bricksN = 15;
-	final int bricksM = 8;
-	final int bricksHeight = 40;
-	final int bricksWidth = 80;
-	final int buttonWidth = 260;
-	final int buttonHeight = 80;
+  final int sceneWidth = 1280;
+  final int sceneHeight = 640;
+  final int wallWidth = 10;
+  final int strokeWidth = 2;
+  final int topHeight = 30;
+  final int bottomHeight = 10;
+  final int playerHeight = 20;
+  final int playerPosY = 570;
+  final int playerWidthEasy = 280;
+  final int playerWidthMedium = 200;
+  final int playerWidthHard = 200;
+  final int playerSpeedEasy = 10;
+  final int playerSpeedMedium = 10;
+  final int playerSpeedHard = 20;
+  final int ballSpeedEasy = 5;
+  final int ballSpeedMedium = 5;
+  final int ballSpeedHard = 10;
+  final int ballSize = 20;
+  final int bricksN = 15;
+  final int bricksM = 8;
+  final int bricksHeight = 40;
+  final int bricksWidth = 80;
+  final int buttonWidth = 260;
+  final int buttonHeight = 80;
 
-	String exitButton;
-	String pauseButton;
-	String botButton;
-	String turnLeftButton;
-	String turnRightButton;
+  String exitButton;
+  String pauseButton;
+  String botButton;
+  String turnLeftButton;
+  String turnRightButton;
 
-	Pane gameRoot;
-	Pane menuRoot;
-	Scene scene;
-	ArrayList<SimpleObject> bricks;
-	Player player;
-	Ball ball;
-	SimpleObject leftWall;
-	SimpleObject rightWall;
-	SimpleObject top;
-	SimpleObject bottom;
-	static int score;
-	Label scoreLabel;
-	Bot bot;
-	static HashSet<String> currentlyActiveKeys;
-	static HashSet<String> lastKey;
-	boolean pause;
-	AnimationTimer timer;
+  Pane gameRoot;
+  Pane menuRoot;
+  Scene scene;
+  ArrayList<SimpleObject> bricks;
+  Player player;
+  Ball ball;
+  SimpleObject leftWall;
+  SimpleObject rightWall;
+  SimpleObject top;
+  SimpleObject bottom;
+  static int score;
+  Label scoreLabel;
+  Bot bot;
+  static HashSet<String> currentlyActiveKeys;
+  static HashSet<String> lastKey;
+  boolean pause;
+  AnimationTimer timer;
 
 
-	@Override
-	public void start(Stage primaryStage) {
-		primaryStage.setTitle("ArtRik");
-		showMenu(primaryStage);
-	}
+  @Override
+  public void start(Stage primaryStage) {
+    primaryStage.setTitle("ArtRik");
+    showMenu(primaryStage);
+  }
 
-	private void startGame(Stage primaryStage, int mode) {
-		scene = new Scene(createContent(mode));
-		prepareActionHandlers();
-		primaryStage.setScene(scene);
-		primaryStage.show();
+  private void startGame(Stage primaryStage, int mode) {
+    scene = new Scene(createContent(mode));
+    prepareActionHandlers();
+    primaryStage.setScene(scene);
+    primaryStage.show();
 
-		timer = new AnimationTimer() {
-			@Override
-			public void handle(long now) {
-				if (ball.isGameWon()) {
-					showMessage("You won! Your score is: ");
-				}
-				if (ball.isGameOver()) {
-					showMessage("You lose! Your score is: ");
-				}
-				if (lastKey.contains("SPACE")) {
-					if (pause == false) {
-						pause = true;
-					} else {
-						pause = false;
-					}
-				}
-				if (lastKey.contains("ESCAPE")) {
-					gameRoot.getChildren().clear();
-					timer.stop();
-					showMenu(primaryStage);
-				}
-				if (lastKey.contains("B")) {
-					if (bot.isOn()) {
-						bot.setOff();
-					} else {
-						bot.setOn();
-					}
-				}
-				lastKey.clear();
-				if (!pause) {
-					update();
-				}
-			}
-		};
-		timer.start();
-	}
+    timer = new AnimationTimer() {
+      @Override
+      public void handle(long now) {
+        if (ball.isGameWon()) {
+          showMessage("You won! Your score is: ");
+        }
+        if (ball.isGameOver()) {
+          showMessage("You lose! Your score is: ");
+        }
+        if (lastKey.contains("SPACE")) {
+          if (pause == false) {
+            pause = true;
+          } else {
+            pause = false;
+          }
+        }
+        if (lastKey.contains("ESCAPE")) {
+          gameRoot.getChildren().clear();
+          timer.stop();
+          showMenu(primaryStage);
+        }
+        if (lastKey.contains("B")) {
+          if (bot.isOn()) {
+            bot.setOff();
+          } else {
+            bot.setOn();
+          }
+        }
+        lastKey.clear();
+        if (!pause) {
+          update();
+        }
+      }
+    };
+    timer.start();
+  }
 
-	private Parent createContent(int mode) {
-		pause = true;
-		gameRoot = new Pane();
-		gameRoot.setPrefSize(1280, 640);
-		Rectangle bg = new Rectangle(sceneWidth, sceneHeight, Color.GREY);
-		leftWall = new SimpleObject(0, 0, wallWidth, sceneHeight,
-						strokeWidth, Color.ORANGE, Color.BEIGE);
-		rightWall = new SimpleObject(sceneWidth - wallWidth, 0, wallWidth,
-						sceneWidth, strokeWidth, Color.ORANGE, Color.BEIGE);
-		bottom = new SimpleObject(0, sceneHeight, sceneWidth, bottomHeight,
-						strokeWidth, Color.ORANGE, Color.BEIGE);
-		top = new SimpleObject(0, 0, sceneWidth, topHeight,
-						strokeWidth, Color.ORANGE, Color.BEIGE);
-		score = 0;
-		scoreLabel = new Label("Score : " + score);
-		scoreLabel.setLayoutX(40);
-		scoreLabel.setLayoutY(0);
-		scoreLabel.setFont(javafx.scene.text.Font.font(20));
+  private Parent createContent(int mode) {
+    pause = true;
+    gameRoot = new Pane();
+    gameRoot.setPrefSize(1280, 640);
+    Rectangle bg = new Rectangle(sceneWidth, sceneHeight, Color.GREY);
+    leftWall = new SimpleObject(0, 0, wallWidth, sceneHeight,
+        strokeWidth, Color.ORANGE, Color.BEIGE);
+    rightWall = new SimpleObject(sceneWidth - wallWidth, 0, wallWidth,
+        sceneWidth, strokeWidth, Color.ORANGE, Color.BEIGE);
+    bottom = new SimpleObject(0, sceneHeight, sceneWidth, bottomHeight,
+        strokeWidth, Color.ORANGE, Color.BEIGE);
+    top = new SimpleObject(0, 0, sceneWidth, topHeight,
+        strokeWidth, Color.ORANGE, Color.BEIGE);
+    score = 0;
+    scoreLabel = new Label("Score : " + score);
+    scoreLabel.setLayoutX(40);
+    scoreLabel.setLayoutY(0);
+    scoreLabel.setFont(javafx.scene.text.Font.font(20));
 
-		switch (mode) {
-			case 0: {
-				player = new Player(sceneWidth / 2 - playerWidthEasy / 2,
-								playerPosY, playerWidthEasy, playerHeight,
-								strokeWidth, Color.ORANGE, Color.BEIGE,
-								wallWidth, sceneWidth - wallWidth, playerSpeedEasy);
-				ball = new Ball(sceneWidth / 2 - ballSize / 2, playerPosY - ballSize,
-								ballSize, ballSize, strokeWidth, Color.ORANGE,
-								Color.BEIGE, wallWidth, sceneWidth - wallWidth,
-								topHeight, sceneHeight, ballSpeedEasy);
-				break;
-			}
-			case 1: {
-				player = new Player(sceneWidth / 2 - playerWidthMedium / 2,
-								playerPosY, playerWidthMedium,
-								playerHeight, strokeWidth, Color.ORANGE, Color.BEIGE,
-								wallWidth, sceneWidth - wallWidth, playerSpeedMedium);
-				ball = new Ball(sceneWidth / 2 - ballSize / 2, playerPosY - ballSize,
-								ballSize, ballSize, strokeWidth, Color.ORANGE,
-								Color.BEIGE, wallWidth, sceneWidth - wallWidth,
-								topHeight, sceneHeight, ballSpeedMedium);
-				break;
-			}
-			case 2: {
-				player = new Player(sceneWidth / 2 - playerWidthHard / 2,
-								playerPosY, playerWidthHard, playerHeight,
-								strokeWidth, Color.ORANGE, Color.BEIGE,
-								wallWidth, sceneWidth - wallWidth, playerSpeedHard);
-				ball = new Ball(sceneWidth / 2 - ballSize / 2,
-								playerPosY - ballSize, ballSize,
-								ballSize, strokeWidth, Color.ORANGE,
-								Color.BEIGE, wallWidth, sceneWidth - wallWidth,
-								topHeight, sceneHeight, ballSpeedHard);
-				break;
-			}
+    switch (mode) {
+      case 0: {
+        player = new Player(sceneWidth / 2 - playerWidthEasy / 2,
+            playerPosY, playerWidthEasy, playerHeight,
+            strokeWidth, Color.ORANGE, Color.BEIGE,
+            wallWidth, sceneWidth - wallWidth, playerSpeedEasy);
+        ball = new Ball(sceneWidth / 2 - ballSize / 2, playerPosY - ballSize,
+            ballSize, ballSize, strokeWidth, Color.ORANGE,
+            Color.BEIGE, wallWidth, sceneWidth - wallWidth,
+            topHeight, sceneHeight, ballSpeedEasy);
+        break;
+      }
+      case 1: {
+        player = new Player(sceneWidth / 2 - playerWidthMedium / 2,
+            playerPosY, playerWidthMedium,
+            playerHeight, strokeWidth, Color.ORANGE, Color.BEIGE,
+            wallWidth, sceneWidth - wallWidth, playerSpeedMedium);
+        ball = new Ball(sceneWidth / 2 - ballSize / 2, playerPosY - ballSize,
+            ballSize, ballSize, strokeWidth, Color.ORANGE,
+            Color.BEIGE, wallWidth, sceneWidth - wallWidth,
+            topHeight, sceneHeight, ballSpeedMedium);
+        break;
+      }
+      case 2: {
+        player = new Player(sceneWidth / 2 - playerWidthHard / 2,
+            playerPosY, playerWidthHard, playerHeight,
+            strokeWidth, Color.ORANGE, Color.BEIGE,
+            wallWidth, sceneWidth - wallWidth, playerSpeedHard);
+        ball = new Ball(sceneWidth / 2 - ballSize / 2,
+            playerPosY - ballSize, ballSize,
+            ballSize, strokeWidth, Color.ORANGE,
+            Color.BEIGE, wallWidth, sceneWidth - wallWidth,
+            topHeight, sceneHeight, ballSpeedHard);
+        break;
+      }
 
-		}
+    }
 
-		ball.setPlayer(player);
-		ball.setFlagsInFalse();
-		bot = new Bot(player, ball);
-		gameRoot.getChildren().addAll(bg, player, ball, leftWall, rightWall,
-						bottom, top, scoreLabel);
-		bricks = new ArrayList<>();
-		createBricks(bricksN, bricksM, bricksWidth, bricksHeight);
-		return gameRoot;
-	}
+    ball.setPlayer(player);
+    ball.setFlagsInFalse();
+    bot = new Bot(player, ball);
+    gameRoot.getChildren().addAll(bg, player, ball, leftWall, rightWall,
+        bottom, top, scoreLabel);
+    bricks = new ArrayList<>();
+    createBricks(bricksN, bricksM, bricksWidth, bricksHeight);
+    return gameRoot;
+  }
 
-	private void createBricks(int colomn, int raw, int w, int h) {
-		gameRoot.getChildren().removeAll(bricks);
-		bricks.clear();
-		for (int i = 0; i < raw; i++) {
-			for (int j = 0; j < colomn; j++) {
-				SimpleObject brick = new SimpleObject(j * w + 40, i * h + 75,
-								w, h, strokeWidth, Color.ORANGE, Color.BEIGE);
-				bricks.add(brick);
+  private void createBricks(int colomn, int raw, int w, int h) {
+    gameRoot.getChildren().removeAll(bricks);
+    bricks.clear();
+    for (int i = 0; i < raw; i++) {
+      for (int j = 0; j < colomn; j++) {
+        SimpleObject brick = new SimpleObject(j * w + 40, i * h + 75,
+            w, h, strokeWidth, Color.ORANGE, Color.BEIGE);
+        bricks.add(brick);
 
-			}
-		}
-		gameRoot.getChildren().addAll(bricks);
-		ball.setBricks(bricks);
-	}
+      }
+    }
+    gameRoot.getChildren().addAll(bricks);
+    ball.setBricks(bricks);
+  }
 
-	private void restart() {
-		gameRoot.getChildren().removeAll(bricks);
-		createBricks(bricksN, bricksM, bricksWidth, bricksHeight);
-		score = 0;
-		player.setTranslateX(sceneWidth / 2 - player.getWidth() / 2 + strokeWidth / 2);
-		player.setTranslateY(playerPosY);
-		ball.setTranslateX(sceneWidth / 2 - ballSize / 2);
-		ball.setTranslateY(playerPosY - ballSize);
-		ball.gameOver = false;
-		ball.setFlagsInFalse();
-	}
+  private void restart() {
+    gameRoot.getChildren().removeAll(bricks);
+    createBricks(bricksN, bricksM, bricksWidth, bricksHeight);
+    score = 0;
+    player.setTranslateX(sceneWidth / 2 - player.getWidth() / 2 + strokeWidth / 2);
+    player.setTranslateY(playerPosY);
+    ball.setTranslateX(sceneWidth / 2 - ballSize / 2);
+    ball.setTranslateY(playerPosY - ballSize);
+    ball.gameOver = false;
+    ball.setFlagsInFalse();
+  }
 
-	private void update() {
-		if (bot.isOn()) {
-			bot.Execute();
-		} else if (currentlyActiveKeys.contains("LEFT")) {
-			player.moveLeft();
-		} else if (currentlyActiveKeys.contains("RIGHT")) {
-			player.moveRight();
-		}
-		ball.move();
-		scoreLabel.setText("Score : " + score);
-	}
+  private void update() {
+    if (bot.isOn()) {
+      bot.Execute();
+    } else if (currentlyActiveKeys.contains("LEFT")) {
+      player.moveLeft();
+    } else if (currentlyActiveKeys.contains("RIGHT")) {
+      player.moveRight();
+    }
+    ball.move();
+    scoreLabel.setText("Score : " + score);
+  }
 
-	private void prepareActionHandlers() {
-		// use a set so duplicates are not possible
-		currentlyActiveKeys = new HashSet<String>();
-		lastKey = new HashSet<String>();
-		scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
-			@Override
-			public void handle(KeyEvent event) {
-				currentlyActiveKeys.add(event.getCode().toString());
-				lastKey.add(event.getCode().toString());
-			}
-		});
-		scene.setOnKeyReleased(new EventHandler<KeyEvent>() {
-			@Override
-			public void handle(KeyEvent event) {
-				currentlyActiveKeys.remove(event.getCode().toString());
-			}
-		});
-	}
+  private void prepareActionHandlers() {
+    // use a set so duplicates are not possible
+    currentlyActiveKeys = new HashSet<String>();
+    lastKey = new HashSet<String>();
+    scene.setOnKeyPressed(new EventHandler<KeyEvent>() {
+      @Override
+      public void handle(KeyEvent event) {
+        currentlyActiveKeys.add(event.getCode().toString());
+        lastKey.add(event.getCode().toString());
+      }
+    });
+    scene.setOnKeyReleased(new EventHandler<KeyEvent>() {
+      @Override
+      public void handle(KeyEvent event) {
+        currentlyActiveKeys.remove(event.getCode().toString());
+      }
+    });
+  }
 
-	private void showMessage(String msg) {
-		pause = true;
-		Button button = new Button(msg + score);
-		button.setLayoutX(510);
-		button.setLayoutY(240);
-		button.setPrefSize(buttonWidth, buttonHeight);
-		button.setOnAction(e -> {
-			pause = false;
-			button.setVisible(false);
-			gameRoot.getChildren().remove(button);
-		});
-		ball.gameWon = false;
-		ball.gameOver = false;
-		restart();
-		gameRoot.getChildren().add(button);
-	}
+  private void showMessage(String msg) {
+    pause = true;
+    Button button = new Button(msg + score);
+    button.setLayoutX(510);
+    button.setLayoutY(240);
+    button.setPrefSize(buttonWidth, buttonHeight);
+    button.setOnAction(e -> {
+      pause = false;
+      button.setVisible(false);
+      gameRoot.getChildren().remove(button);
+    });
+    ball.gameWon = false;
+    ball.gameOver = false;
+    restart();
+    gameRoot.getChildren().add(button);
+  }
 
-	private void showMenu(Stage primaryStage) {
-		menuRoot = new Pane();
-		menuRoot.setPrefSize(sceneWidth, sceneHeight);
-		Rectangle bg = new Rectangle(sceneWidth, sceneHeight, Color.GREY);
-		Button[] button1 = new Button[4];
+  private void showMenu(Stage primaryStage) {
+    menuRoot = new Pane();
+    menuRoot.setPrefSize(sceneWidth, sceneHeight);
+    Rectangle bg = new Rectangle(sceneWidth, sceneHeight, Color.GREY);
+    Button[] button1 = new Button[4];
 
-		for (int i = 0; i < 4; i++) {
-			button1[i] = new Button();
-			button1[i].setLayoutX(510);
-			button1[i].setLayoutY(i * 100 + 140);
-			button1[i].setPrefSize(buttonWidth, buttonHeight);
-			menuRoot.getChildren().add(button1[i]);
-		}
+    for (int i = 0; i < 4; i++) {
+      button1[i] = new Button();
+      button1[i].setLayoutX(510);
+      button1[i].setLayoutY(i * 100 + 140);
+      button1[i].setPrefSize(buttonWidth, buttonHeight);
+      menuRoot.getChildren().add(button1[i]);
+    }
 
-		button1[0].setText("NEW GAME");
-		button1[1].setText("SETTINGS");
-		button1[2].setText("ABOUT");
-		button1[3].setText("EXIT");
+    button1[0].setText("NEW GAME");
+    button1[1].setText("SETTINGS");
+    button1[2].setText("ABOUT");
+    button1[3].setText("EXIT");
 
-		button1[0].setOnAction(e -> {
-			menuRoot.getChildren().removeAll(button1);
-			Button[] button2 = new Button[4];
-			for (int i = 0; i < 4; i++) {
-				button2[i] = new Button();
-				button2[i].setLayoutX(510);
-				button2[i].setLayoutY(i * 100 + 140);
-				button2[i].setPrefSize(buttonWidth, buttonHeight);
-				menuRoot.getChildren().add(button2[i]);
-			}
-			button2[0].setText("Easy");
-			button2[1].setText("Medium");
-			button2[2].setText("Hard");
-			button2[3].setText("Back");
-			button2[0].setOnAction(event -> {
-				menuRoot.getChildren().clear();
-				startGame(primaryStage, 0);
-			});
-			button2[1].setOnAction(event -> {
-				menuRoot.getChildren().clear();
-				startGame(primaryStage, 1);
-			});
-			button2[2].setOnAction(event -> {
-				menuRoot.getChildren().clear();
-				startGame(primaryStage, 2);
-			});
-			button2[3].setOnAction(event -> {
-				menuRoot.getChildren().removeAll(button2);
-				menuRoot.getChildren().addAll(button1);
-			});
-		});
+    button1[0].setOnAction(e -> {
+      menuRoot.getChildren().removeAll(button1);
+      Button[] button2 = new Button[4];
+      for (int i = 0; i < 4; i++) {
+        button2[i] = new Button();
+        button2[i].setLayoutX(510);
+        button2[i].setLayoutY(i * 100 + 140);
+        button2[i].setPrefSize(buttonWidth, buttonHeight);
+        menuRoot.getChildren().add(button2[i]);
+      }
+      button2[0].setText("Easy");
+      button2[1].setText("Medium");
+      button2[2].setText("Hard");
+      button2[3].setText("Back");
+      button2[0].setOnAction(event -> {
+        menuRoot.getChildren().clear();
+        startGame(primaryStage, 0);
+      });
+      button2[1].setOnAction(event -> {
+        menuRoot.getChildren().clear();
+        startGame(primaryStage, 1);
+      });
+      button2[2].setOnAction(event -> {
+        menuRoot.getChildren().clear();
+        startGame(primaryStage, 2);
+      });
+      button2[3].setOnAction(event -> {
+        menuRoot.getChildren().removeAll(button2);
+        menuRoot.getChildren().addAll(button1);
+      });
+    });
 
-		button1[3].setOnAction(event -> {
-			System.exit(0);
-		});
+    button1[3].setOnAction(event -> {
+      System.exit(0);
+    });
 
-		scene = new Scene(menuRoot);
-		primaryStage.setScene(scene);
-		primaryStage.show();
-	}
+    scene = new Scene(menuRoot);
+    primaryStage.setScene(scene);
+    primaryStage.show();
+  }
 
-	public static void main(String[] args) {
-		launch(args);
-	}
+  public static void main(String[] args) {
+    launch(args);
+  }
 }
diff --git a/src/sample/Ball.java b/src/sample/Ball.java
index 9455a77..c6da5c1 100644
--- a/src/sample/Ball.java
+++ b/src/sample/Ball.java
@@ -9,236 +9,236 @@
 import java.util.Set;
 
 public class Ball extends SimpleObject {
-	Player player;
-	ArrayList<SimpleObject> bricks;
-	ArrayList<Integer> indexs;
-	Rectangle rect;
-	double speed, kx, ky;
-	double leftBorder;
-	double rightBorder;
-	double topBorder;
-	double bottomBorder;
-	boolean gameOver;
-	boolean gameWon;
-	boolean lc, rc, tc, bc, pc, tcow, bcow;
+  Player player;
+  ArrayList<SimpleObject> bricks;
+  ArrayList<Integer> indexs;
+  Rectangle rect;
+  double speed, kx, ky;
+  double leftBorder;
+  double rightBorder;
+  double topBorder;
+  double bottomBorder;
+  boolean gameOver;
+  boolean gameWon;
+  boolean lc, rc, tc, bc, pc, tcow, bcow;
 
-	public Ball(double x, double y, double w, double h, double sw,
-							Color fillColor, Color strokeColor,
-							double lb, double rb, double tb,
-							double bb, double speed) {
-		super(x, y, w, h, sw, fillColor, strokeColor);
-		gameOver = false;
-		gameWon = false;
-		leftBorder = lb;
-		rightBorder = rb;
-		topBorder = tb;
-		bottomBorder = bb;
-		indexs = new ArrayList<>();
-		bricks = new ArrayList<>();
-		this.speed = speed;
-		ky = 1;
-		kx = 0;
-	}
+  public Ball(double x, double y, double w, double h, double sw,
+              Color fillColor, Color strokeColor,
+              double lb, double rb, double tb,
+              double bb, double speed) {
+    super(x, y, w, h, sw, fillColor, strokeColor);
+    gameOver = false;
+    gameWon = false;
+    leftBorder = lb;
+    rightBorder = rb;
+    topBorder = tb;
+    bottomBorder = bb;
+    indexs = new ArrayList<>();
+    bricks = new ArrayList<>();
+    this.speed = speed;
+    ky = 1;
+    kx = 0;
+  }
 
-	public void checkCollision() {
-		if (this.getTranslateX() + speed * kx <= leftBorder) {
-			lc = true;
-		}
-		if (this.getTranslateX() + this.getWidth() + speed * kx
-						>= rightBorder) {
-			rc = true;
-		}
-		if (this.getTranslateY() + speed * ky <= topBorder) {
-			tc = true;
-		}
-		if (this.getTranslateY() + this.getHeight() + speed * ky
-						>= bottomBorder) {
+  public void checkCollision() {
+    if (this.getTranslateX() + speed * kx <= leftBorder) {
+      lc = true;
+    }
+    if (this.getTranslateX() + this.getWidth() + speed * kx
+        >= rightBorder) {
+      rc = true;
+    }
+    if (this.getTranslateY() + speed * ky <= topBorder) {
+      tc = true;
+    }
+    if (this.getTranslateY() + this.getHeight() + speed * ky
+        >= bottomBorder) {
 
-			gameOver = true;
-		}
-		// collision with player
-		if (ky > 0) {
-			if (this.getTranslateX() + this.getWidth()
-							> player.getTranslateX() &&
-							this.getTranslateX() < player.getTranslateX()
-											+ player.getWidth()) {
-				if (this.getTranslateY() <= player.getTranslateY() &&
-								this.getTranslateY() + this.getHeight()
-												>= player.getTranslateY()) {
-					pc = true;
-				}
-			}
-		}
-		// collision with player
-		if (kx > 0) {
-			if (this.getTranslateY() + this.getHeight()
-							> player.getTranslateY() &&
-							this.getTranslateY() < player.getTranslateY()
-											+ player.getHeight()) {
-				if (this.getTranslateX() <= player.getTranslateX() &&
-								this.getTranslateX() + this.getWidth()
-												>= player.getTranslateX()) {
-					rc = true;
-				}
-			}
-		}
-		// collision with player
-		if (kx < 0) {
-			if (this.getTranslateY() + this.getHeight()
-							> player.getTranslateY() &&
-							this.getTranslateY() < player.getTranslateY()
-											+ player.getHeight()) {
-				if (this.getTranslateX() <= player.getTranslateX()
-								+ player.getWidth() &&
-								this.getTranslateX() + this.getWidth()
-												>= player.getTranslateX()
-												+ player.getWidth()) {
-					lc = true;
-				}
-			}
-		}
-		// collision with brick
+      gameOver = true;
+    }
+    // collision with player
+    if (ky > 0) {
+      if (this.getTranslateX() + this.getWidth()
+          > player.getTranslateX() &&
+          this.getTranslateX() < player.getTranslateX()
+              + player.getWidth()) {
+        if (this.getTranslateY() <= player.getTranslateY() &&
+            this.getTranslateY() + this.getHeight()
+                >= player.getTranslateY()) {
+          pc = true;
+        }
+      }
+    }
+    // collision with player
+    if (kx > 0) {
+      if (this.getTranslateY() + this.getHeight()
+          > player.getTranslateY() &&
+          this.getTranslateY() < player.getTranslateY()
+              + player.getHeight()) {
+        if (this.getTranslateX() <= player.getTranslateX() &&
+            this.getTranslateX() + this.getWidth()
+                >= player.getTranslateX()) {
+          rc = true;
+        }
+      }
+    }
+    // collision with player
+    if (kx < 0) {
+      if (this.getTranslateY() + this.getHeight()
+          > player.getTranslateY() &&
+          this.getTranslateY() < player.getTranslateY()
+              + player.getHeight()) {
+        if (this.getTranslateX() <= player.getTranslateX()
+            + player.getWidth() &&
+            this.getTranslateX() + this.getWidth()
+                >= player.getTranslateX()
+                + player.getWidth()) {
+          lc = true;
+        }
+      }
+    }
+    // collision with brick
 
-		for (int i = 0; i < bricks.size(); i++) {
-			SimpleObject brick = bricks.get(i);
-			if (this.getTranslateX() + this.getWidth()
-							> brick.getTranslateX() &&
-							this.getTranslateX() < brick.getTranslateX()
-											+ brick.getWidth()) {
-				if (this.getTranslateY() <= brick.getTranslateY() &&
-								this.getTranslateY() + this.getHeight()
-												>= brick.getTranslateY()) {
-					if (ky > 0) {
-						bc = true;
-					} else {
-						bcow = true;
-					}
-					indexs.add(i);
-				}
-			}
-		}
+    for (int i = 0; i < bricks.size(); i++) {
+      SimpleObject brick = bricks.get(i);
+      if (this.getTranslateX() + this.getWidth()
+          > brick.getTranslateX() &&
+          this.getTranslateX() < brick.getTranslateX()
+              + brick.getWidth()) {
+        if (this.getTranslateY() <= brick.getTranslateY() &&
+            this.getTranslateY() + this.getHeight()
+                >= brick.getTranslateY()) {
+          if (ky > 0) {
+            bc = true;
+          } else {
+            bcow = true;
+          }
+          indexs.add(i);
+        }
+      }
+    }
 
-		// collision with brick
-		for (int i = 0; i < bricks.size(); i++) {
-			SimpleObject brick = bricks.get(i);
-			if (this.getTranslateX() + this.getWidth()
-							> brick.getTranslateX() &&
-							this.getTranslateX() < brick.getTranslateX()
-											+ brick.getWidth()) {
-				if (this.getTranslateY() <= brick.getTranslateY()
-								+ brick.getHeight() &&
-								this.getTranslateY() + this.getHeight()
-												>= brick.getTranslateY()
-												+ brick.getHeight()) {
-					if (ky < 0) {
-						tc = true;
-					} else {
-						tcow = true;
-					}
-					indexs.add(i);
-				}
-			}
-		}
+    // collision with brick
+    for (int i = 0; i < bricks.size(); i++) {
+      SimpleObject brick = bricks.get(i);
+      if (this.getTranslateX() + this.getWidth()
+          > brick.getTranslateX() &&
+          this.getTranslateX() < brick.getTranslateX()
+              + brick.getWidth()) {
+        if (this.getTranslateY() <= brick.getTranslateY()
+            + brick.getHeight() &&
+            this.getTranslateY() + this.getHeight()
+                >= brick.getTranslateY()
+                + brick.getHeight()) {
+          if (ky < 0) {
+            tc = true;
+          } else {
+            tcow = true;
+          }
+          indexs.add(i);
+        }
+      }
+    }
 
-		// collision with brick
-		if (kx > 0) {
-			for (int i = 0; i < bricks.size(); i++) {
-				SimpleObject brick = bricks.get(i);
-				if (this.getTranslateY() + this.getHeight()
-								> brick.getTranslateY() &&
-								this.getTranslateY() < brick.getTranslateY()
-												+ brick.getHeight()) {
-					if (this.getTranslateX() <= brick.getTranslateX() &&
-									this.getTranslateX() + this.getWidth()
-													>= brick.getTranslateX()) {
-						lc = true;
-						indexs.add(i);
-					}
-				}
-			}
-		}
-		// collision with brick
-		if (kx < 0) {
-			for (int i = 0; i < bricks.size(); i++) {
-				SimpleObject brick = bricks.get(i);
-				if (this.getTranslateY() + this.getHeight()
-								> brick.getTranslateY() &&
-								this.getTranslateY() < brick.getTranslateY()
-												+ brick.getHeight()) {
-					if (this.getTranslateX() <= brick.getTranslateX()
-									+ brick.getWidth() &&
-									this.getTranslateX() + this.getWidth()
-													>= brick.getTranslateX()
-													+ brick.getWidth()) {
-						lc = true;
-						indexs.add(i);
-					}
-				}
-			}
-		}
-	}
+    // collision with brick
+    if (kx > 0) {
+      for (int i = 0; i < bricks.size(); i++) {
+        SimpleObject brick = bricks.get(i);
+        if (this.getTranslateY() + this.getHeight()
+            > brick.getTranslateY() &&
+            this.getTranslateY() < brick.getTranslateY()
+                + brick.getHeight()) {
+          if (this.getTranslateX() <= brick.getTranslateX() &&
+              this.getTranslateX() + this.getWidth()
+                  >= brick.getTranslateX()) {
+            lc = true;
+            indexs.add(i);
+          }
+        }
+      }
+    }
+    // collision with brick
+    if (kx < 0) {
+      for (int i = 0; i < bricks.size(); i++) {
+        SimpleObject brick = bricks.get(i);
+        if (this.getTranslateY() + this.getHeight()
+            > brick.getTranslateY() &&
+            this.getTranslateY() < brick.getTranslateY()
+                + brick.getHeight()) {
+          if (this.getTranslateX() <= brick.getTranslateX()
+              + brick.getWidth() &&
+              this.getTranslateX() + this.getWidth()
+                  >= brick.getTranslateX()
+                  + brick.getWidth()) {
+            lc = true;
+            indexs.add(i);
+          }
+        }
+      }
+    }
+  }
 
-	public void move() {
-		checkCollision();
-		if ((tc && !bcow) ^ (bc && !tcow)) {
-			ky = -ky;
-		} else if (lc ^ rc) {
-			kx = -kx;
-		}
-		if (pc) {
-			double k;
-			k = (this.getTranslateX() + this.getWidth() / 2
-							- player.getTranslateX()
-							- player.getWidth() / 2) / (player.getWidth() / 2);
-			kx = k;
-			ky = -0.8 - (1 - Math.abs(k));
-		}
-		// destroying bricks
-		Set ixs = new HashSet(indexs);
-		indexs.clear();
-		indexs.addAll(ixs);
-		indexs.sort(Comparator.naturalOrder());
-		for (int k = 0; indexs.size() > 0; k++) {
-			SimpleObject b = bricks.get(indexs.get(0) - k);
-			b.setVisible(false);
-			bricks.remove(b);
-			indexs.remove(0);
-			ArtRico.score += 1;
-		}
-		if (bricks.size() == 0) {
-			gameWon = true;
-		}
+  public void move() {
+    checkCollision();
+    if ((tc && !bcow) ^ (bc && !tcow)) {
+      ky = -ky;
+    } else if (lc ^ rc) {
+      kx = -kx;
+    }
+    if (pc) {
+      double k;
+      k = (this.getTranslateX() + this.getWidth() / 2
+          - player.getTranslateX()
+          - player.getWidth() / 2) / (player.getWidth() / 2);
+      kx = k;
+      ky = -0.8 - (1 - Math.abs(k));
+    }
+    // destroying bricks
+    Set ixs = new HashSet(indexs);
+    indexs.clear();
+    indexs.addAll(ixs);
+    indexs.sort(Comparator.naturalOrder());
+    for (int k = 0; indexs.size() > 0; k++) {
+      SimpleObject b = bricks.get(indexs.get(0) - k);
+      b.setVisible(false);
+      bricks.remove(b);
+      indexs.remove(0);
+      ArtRico.score += 1;
+    }
+    if (bricks.size() == 0) {
+      gameWon = true;
+    }
 
-		// move ball
-		setTranslateX(getTranslateX() + speed * kx);
-		setTranslateY(getTranslateY() + speed * ky);
-		setFlagsInFalse(); // reset flags
-	}
+    // move ball
+    setTranslateX(getTranslateX() + speed * kx);
+    setTranslateY(getTranslateY() + speed * ky);
+    setFlagsInFalse(); // reset flags
+  }
 
-	public void setBricks(ArrayList<SimpleObject> bricks) {
-		this.bricks.clear();
-		this.bricks.addAll(bricks);
-	}
+  public void setBricks(ArrayList<SimpleObject> bricks) {
+    this.bricks.clear();
+    this.bricks.addAll(bricks);
+  }
 
-	public void setPlayer(Player player) {
-		this.player = player;
-	}
+  public void setPlayer(Player player) {
+    this.player = player;
+  }
 
-	public boolean isGameOver() {
-		return gameOver;
-	}
+  public boolean isGameOver() {
+    return gameOver;
+  }
 
-	public boolean isGameWon() {
-		return gameWon;
-	}
+  public boolean isGameWon() {
+    return gameWon;
+  }
 
-	public void setFlagsInFalse() {
-		lc = false;
-		rc = false;
-		tc = false;
-		bc = false;
-		pc = false;
-		tcow = false;
-		bcow = false;
-	}
+  public void setFlagsInFalse() {
+    lc = false;
+    rc = false;
+    tc = false;
+    bc = false;
+    pc = false;
+    tcow = false;
+    bcow = false;
+  }
 }
diff --git a/src/sample/Bot.java b/src/sample/Bot.java
index fcd2ddc..ec2477a 100644
--- a/src/sample/Bot.java
+++ b/src/sample/Bot.java
@@ -1,51 +1,51 @@
 package sample;
 
 public class Bot {
-	final int timeOfMoving = 2000;
-	Player player;
-	Ball ball;
-	int time;
-	boolean on;
+  final int timeOfMoving = 2000;
+  Player player;
+  Ball ball;
+  int time;
+  boolean on;
 
-	public Bot(Player player, Ball ball) {
-		this.player = player;
-		this.ball = ball;
-		time = 0;
-		on = false;
-	}
+  public Bot(Player player, Ball ball) {
+    this.player = player;
+    this.ball = ball;
+    time = 0;
+    on = false;
+  }
 
-	public void Execute() {
-		if (time < timeOfMoving) {
-			if (player.getTranslateX() + player.getWidth() / 2
-							< ball.getTranslateX() + ball.getWidth()) {
-				player.moveRight();
-			} else {
-				player.moveLeft();
-			}
-		}
-		if (time > timeOfMoving) {
-			if (player.getTranslateX() + player.getWidth() / 2
-							< ball.getTranslateX()) {
-				player.moveRight();
-			} else {
-				player.moveLeft();
-			}
-		}
-		if (time == timeOfMoving * 2) {
-			time = 0;
-		}
-		time++;
-	}
+  public void Execute() {
+    if (time < timeOfMoving) {
+      if (player.getTranslateX() + player.getWidth() / 2
+          < ball.getTranslateX() + ball.getWidth()) {
+        player.moveRight();
+      } else {
+        player.moveLeft();
+      }
+    }
+    if (time > timeOfMoving) {
+      if (player.getTranslateX() + player.getWidth() / 2
+          < ball.getTranslateX()) {
+        player.moveRight();
+      } else {
+        player.moveLeft();
+      }
+    }
+    if (time == timeOfMoving * 2) {
+      time = 0;
+    }
+    time++;
+  }
 
-	public boolean isOn() {
-		return on;
-	}
+  public boolean isOn() {
+    return on;
+  }
 
-	public void setOn() {
-		on = true;
-	}
+  public void setOn() {
+    on = true;
+  }
 
-	public void setOff() {
-		on = false;
-	}
+  public void setOff() {
+    on = false;
+  }
 }
diff --git a/src/sample/Player.java b/src/sample/Player.java
index e061e0c..262ee65 100644
--- a/src/sample/Player.java
+++ b/src/sample/Player.java
@@ -4,31 +4,31 @@
 import javafx.scene.shape.Rectangle;
 
 public class Player extends SimpleObject {
-	Rectangle rect;
-	double speed;
-	double leftBorder;
-	double rightBorder;
+  Rectangle rect;
+  double speed;
+  double leftBorder;
+  double rightBorder;
 
-	public Player(double x, double y, double w, double h, double sw,
-								Color fillColor, Color strokeColor,
-								double lb, double rb, double speed) {
-		super(x, y, w, h, sw, fillColor, strokeColor);
-		leftBorder = lb;
-		rightBorder = rb;
-		this.speed = speed;
-	}
+  public Player(double x, double y, double w, double h, double sw,
+                Color fillColor, Color strokeColor,
+                double lb, double rb, double speed) {
+    super(x, y, w, h, sw, fillColor, strokeColor);
+    leftBorder = lb;
+    rightBorder = rb;
+    this.speed = speed;
+  }
 
-	public void moveLeft() {
-		if (this.getTranslateX() <= leftBorder) {
-			return;
-		}
-		setTranslateX(this.getTranslateX() - speed);
-	}
+  public void moveLeft() {
+    if (this.getTranslateX() <= leftBorder) {
+      return;
+    }
+    setTranslateX(this.getTranslateX() - speed);
+  }
 
-	public void moveRight() {
-		if (this.getTranslateX() + this.getWidth() >= rightBorder) {
-			return;
-		}
-		setTranslateX(this.getTranslateX() + speed);
-	}
+  public void moveRight() {
+    if (this.getTranslateX() + this.getWidth() >= rightBorder) {
+      return;
+    }
+    setTranslateX(this.getTranslateX() + speed);
+  }
 }
diff --git a/src/sample/SimpleObject.java b/src/sample/SimpleObject.java
index 037b7a8..e3cfcf8 100644
--- a/src/sample/SimpleObject.java
+++ b/src/sample/SimpleObject.java
@@ -5,15 +5,15 @@
 import javafx.scene.shape.Rectangle;
 
 public class SimpleObject extends Pane {
-	Rectangle rect;
+  Rectangle rect;
 
-	public SimpleObject(double x, double y, double w, double h, double sw,
-											Color fillColor, Color strokeColor) {
-		rect = new Rectangle(w, h, fillColor);
-		this.setTranslateX(x);
-		this.setTranslateY(y);
-		this.getChildren().add(rect);
-		rect.setStrokeWidth(sw);
-		rect.setStroke(strokeColor);
-	}
+  public SimpleObject(double x, double y, double w, double h, double sw,
+                      Color fillColor, Color strokeColor) {
+    rect = new Rectangle(w, h, fillColor);
+    this.setTranslateX(x);
+    this.setTranslateY(y);
+    this.getChildren().add(rect);
+    rect.setStrokeWidth(sw);
+    rect.setStroke(strokeColor);
+  }
 }
\ No newline at end of file