Commits

Anonymous committed 2c57fc6

Removed unused constants file

  • Participants
  • Parent commits c039f32

Comments (0)

Files changed (2)

File defender/src/main/java/com/fxexperience/games/defender/CONSTANTS.java

-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-package com.fxexperience.games.defender;
-
-import javafx.geometry.Dimension2D;
-
-/**
- *
- * @author Jose
- */
-public class CONSTANTS {
-
-    //Level constants
-    public static final double LEVEL_HEIGHT = 600;
-    public static final double LEVEL_WIDTH = 800;
-    //Grid constants
-    public static final double CELL_HEIGHT = 20;
-    public static final double CELL_WIDTH = 20;
-    public static final int COL_COUNT = (int) (LEVEL_WIDTH / CELL_WIDTH);
-    public static final int ROW_COUNT = (int) (LEVEL_HEIGHT / CELL_HEIGHT);
-    public static final Dimension2D CELL_DIMENSIONS = new Dimension2D(CELL_WIDTH, CELL_HEIGHT);
-    //Speed
-    public static final int ENEMY_UNIT_BASE_SPEED = 100;//pixels per second
-}

File defender/src/main/java/com/fxexperience/games/defender/games/simple/LevelPanel.java

  */
 package com.fxexperience.games.defender.games.simple;
 
-import com.fxexperience.games.defender.CONSTANTS;
 import javafx.animation.Animation;
 import javafx.animation.AnimationTimer;
 import javafx.animation.Interpolator;
  * more of those paths.
  */
 public abstract class LevelPanel extends Region {
+    private static final double LEVEL_HEIGHT = 600;
+    private static final double LEVEL_WIDTH = 800;
+
     private Region background;
     private Rectangle clip;
     protected Pane enemyLayer;
     @Override
     protected double computePrefWidth(double v) {
         final Insets insets = getInsets();
-        return CONSTANTS.LEVEL_WIDTH + insets.getLeft() + insets.getRight();
+        return LEVEL_WIDTH + insets.getLeft() + insets.getRight();
     }
 
     @Override
     protected double computePrefHeight(double v) {
         final Insets insets = getInsets();
-        return CONSTANTS.LEVEL_HEIGHT + insets.getTop() + insets.getBottom();
+        return LEVEL_HEIGHT + insets.getTop() + insets.getBottom();
     }
 
     @Override