public UnitActionDetector(TilePanel selectedPanel, Unit selectedUnit, TilePanel tilePanel, List<Unit> units){
      if(selectedPanel == null && selectedUnit == null && units != null && !units.isEmpty()) {
         selectingUnit = true;
      }
      if(selectedPanel == tilePanel) {
         deselectingUnit = true;
      }
      if(selectedUnit != null && selectedPanel != tilePanel){
         movingUnit = true;
      }
   }