Fix several lints and warnings
This commit is contained in:
parent
5c2aeb6e91
commit
5e5cfc3d5f
42 changed files with 70 additions and 63 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -33,7 +33,7 @@ import java.util.Map;
|
|||
import dev.lonami.klooni.effects.EvaporateEffectFactory;
|
||||
import dev.lonami.klooni.effects.ExplodeEffectFactory;
|
||||
import dev.lonami.klooni.effects.SpinEffectFactory;
|
||||
import dev.lonami.klooni.effects.VanishEffectFatory;
|
||||
import dev.lonami.klooni.effects.VanishEffectFactory;
|
||||
import dev.lonami.klooni.effects.WaterdropEffectFactory;
|
||||
import dev.lonami.klooni.interfaces.IEffectFactory;
|
||||
import dev.lonami.klooni.screens.MainMenuScreen;
|
||||
|
@ -49,7 +49,7 @@ public class Klooni extends Game {
|
|||
|
||||
// ordered list of effects. index 0 will get default if VanishEffectFactory is removed from list
|
||||
public final static IEffectFactory[] EFFECTS = {
|
||||
new VanishEffectFatory(),
|
||||
new VanishEffectFactory(),
|
||||
new WaterdropEffectFactory(),
|
||||
new EvaporateEffectFactory(),
|
||||
new SpinEffectFactory(),
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -149,8 +149,9 @@ public class EffectCard extends ShopCard {
|
|||
|
||||
@Override
|
||||
public void performBuy() {
|
||||
Klooni.buyEffect(effect);
|
||||
use();
|
||||
if (Klooni.buyEffect(effect)) {
|
||||
use();
|
||||
}
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -33,7 +33,7 @@ public class ThemeCard extends ShopCard {
|
|||
private final Theme theme;
|
||||
private final Texture background;
|
||||
|
||||
private final static int colorsUsed[][] = {
|
||||
private final static int[][] colorsUsed = {
|
||||
{0, 7, 7},
|
||||
{8, 7, 3},
|
||||
{8, 8, 3}
|
||||
|
@ -106,8 +106,9 @@ public class ThemeCard extends ShopCard {
|
|||
|
||||
@Override
|
||||
public void performBuy() {
|
||||
Klooni.buyTheme(theme);
|
||||
use();
|
||||
if (Klooni.buyTheme(theme)) {
|
||||
use();
|
||||
}
|
||||
}
|
||||
|
||||
//endregion
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -75,7 +75,7 @@ public class ExplodeEffectFactory implements IEffectFactory {
|
|||
this.pos = pos.cpy().add(this.size * 0.5f, this.size * 0.5f);
|
||||
}
|
||||
|
||||
public void draw(final Batch batch, final float dt) {
|
||||
void draw(final Batch batch, final float dt) {
|
||||
vel.add(acc.x * dt, acc.y * dt).scl(0.99f);
|
||||
pos.add(vel.x * dt, vel.y * dt);
|
||||
Cell.draw(color, batch, pos.x, pos.y, size);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -29,7 +29,7 @@ import dev.lonami.klooni.interfaces.IEffect;
|
|||
import dev.lonami.klooni.interfaces.IEffectFactory;
|
||||
|
||||
|
||||
public class VanishEffectFatory implements IEffectFactory {
|
||||
public class VanishEffectFactory implements IEffectFactory {
|
||||
@Override
|
||||
public String getName() {
|
||||
return "vanish";
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -41,7 +41,7 @@ public class Piece {
|
|||
private final int rotation;
|
||||
|
||||
public final int cellCols, cellRows;
|
||||
private final boolean shape[][];
|
||||
private final boolean[][] shape;
|
||||
|
||||
// Default arbitrary value
|
||||
float cellSize = 10f;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -22,18 +22,18 @@ import com.badlogic.gdx.math.Vector2;
|
|||
import dev.lonami.klooni.game.Cell;
|
||||
|
||||
/**
|
||||
* IEffectEfactory interface has to be implemented for each effect.
|
||||
* IEffectFactory interface has to be implemented for each effect.
|
||||
* <p>
|
||||
* It tells the name and the price of the effect and will create it, when needed.
|
||||
*
|
||||
* @see IEffect
|
||||
*/
|
||||
public interface IEffectFactory {
|
||||
public String getName();
|
||||
String getName();
|
||||
|
||||
public String getDisplay();
|
||||
String getDisplay();
|
||||
|
||||
public int getPrice();
|
||||
int getPrice();
|
||||
|
||||
public IEffect create(final Cell deadCell, final Vector2 culprit);
|
||||
IEffect create(final Cell deadCell, final Vector2 culprit);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
@ -119,7 +119,9 @@ class GameScreen implements Screen, InputProcessor, BinSerializable {
|
|||
if (gameMode == GAME_MODE_SCORE) {
|
||||
if (loadSave) {
|
||||
// The user might have a previous game. If this is the case, load it
|
||||
tryLoad();
|
||||
if (!tryLoad()) {
|
||||
System.err.println("failed to load previous games");
|
||||
}
|
||||
} else {
|
||||
// Ensure that there is no old save, we don't want to load it, thus delete it
|
||||
deleteSave();
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
1010! Klooni, a free customizable puzzle game for Android and Desktop
|
||||
Copyright (C) 2017 Lonami Exo | LonamiWebs
|
||||
Copyright (C) 2017-2019 Lonami Exo @ lonami.dev
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue