From 5e5cfc3d5fdd982a23ab51a1cd343f169363426d Mon Sep 17 00:00:00 2001 From: Lonami Exo Date: Thu, 5 Sep 2019 16:44:07 +0200 Subject: [PATCH] Fix several lints and warnings --- android/AndroidManifest.xml | 11 +++++------ android/build.gradle | 3 ++- android/res/xml/backup_rules.xml | 3 +++ android/src/dev/lonami/klooni/AndroidLauncher.java | 2 +- .../src/dev/lonami/klooni/AndroidShareChallenge.java | 2 +- core/src/dev/lonami/klooni/Klooni.java | 6 +++--- core/src/dev/lonami/klooni/ShareChallenge.java | 2 +- core/src/dev/lonami/klooni/SkinLoader.java | 2 +- core/src/dev/lonami/klooni/Theme.java | 2 +- core/src/dev/lonami/klooni/actors/Band.java | 2 +- core/src/dev/lonami/klooni/actors/EffectCard.java | 7 ++++--- core/src/dev/lonami/klooni/actors/MoneyBuyBand.java | 2 +- core/src/dev/lonami/klooni/actors/ShopCard.java | 2 +- core/src/dev/lonami/klooni/actors/SoftButton.java | 2 +- core/src/dev/lonami/klooni/actors/ThemeCard.java | 9 +++++---- .../klooni/effects/EvaporateEffectFactory.java | 2 +- .../lonami/klooni/effects/ExplodeEffectFactory.java | 4 ++-- .../dev/lonami/klooni/effects/SpinEffectFactory.java | 2 +- ...ishEffectFatory.java => VanishEffectFactory.java} | 4 ++-- .../klooni/effects/WaterdropEffectFactory.java | 2 +- core/src/dev/lonami/klooni/game/BaseScorer.java | 2 +- core/src/dev/lonami/klooni/game/Board.java | 2 +- core/src/dev/lonami/klooni/game/BonusParticle.java | 2 +- .../dev/lonami/klooni/game/BonusParticleHandler.java | 2 +- core/src/dev/lonami/klooni/game/Cell.java | 2 +- core/src/dev/lonami/klooni/game/GameLayout.java | 2 +- core/src/dev/lonami/klooni/game/Piece.java | 4 ++-- core/src/dev/lonami/klooni/game/PieceHolder.java | 2 +- core/src/dev/lonami/klooni/game/Scorer.java | 2 +- core/src/dev/lonami/klooni/game/TimeScorer.java | 2 +- .../dev/lonami/klooni/interfaces/IEffectFactory.java | 12 ++++++------ .../dev/lonami/klooni/screens/CustomizeScreen.java | 2 +- core/src/dev/lonami/klooni/screens/GameScreen.java | 6 ++++-- .../dev/lonami/klooni/screens/MainMenuScreen.java | 2 +- .../dev/lonami/klooni/screens/PauseMenuStage.java | 2 +- .../dev/lonami/klooni/screens/ShareScoreScreen.java | 2 +- .../dev/lonami/klooni/screens/TransitionScreen.java | 2 +- .../lonami/klooni/serializer/BinSerializable.java | 2 +- .../dev/lonami/klooni/serializer/BinSerializer.java | 2 +- desktop/build.gradle | 4 ++-- .../dev/lonami/klooni/desktop/DesktopLauncher.java | 2 +- ios/src/dev/lonami/klooni/IOSLauncher.java | 2 +- 42 files changed, 70 insertions(+), 63 deletions(-) create mode 100644 android/res/xml/backup_rules.xml rename core/src/dev/lonami/klooni/effects/{VanishEffectFatory.java => VanishEffectFactory.java} (97%) diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index c21babf..0535925 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,16 +1,15 @@ - - + xmlns:tools="http://schemas.android.com/tools" + package="dev.lonami.klooni"> + android:theme="@style/GdxTheme" + android:fullBackupContent="@xml/backup_rules" + tools:ignore="GoogleAppIndexingWarning"> + + diff --git a/android/src/dev/lonami/klooni/AndroidLauncher.java b/android/src/dev/lonami/klooni/AndroidLauncher.java index 83508d0..166dc9e 100644 --- a/android/src/dev/lonami/klooni/AndroidLauncher.java +++ b/android/src/dev/lonami/klooni/AndroidLauncher.java @@ -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 diff --git a/android/src/dev/lonami/klooni/AndroidShareChallenge.java b/android/src/dev/lonami/klooni/AndroidShareChallenge.java index e0664af..13130a2 100644 --- a/android/src/dev/lonami/klooni/AndroidShareChallenge.java +++ b/android/src/dev/lonami/klooni/AndroidShareChallenge.java @@ -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 diff --git a/core/src/dev/lonami/klooni/Klooni.java b/core/src/dev/lonami/klooni/Klooni.java index 6d5672e..f4a3cf0 100644 --- a/core/src/dev/lonami/klooni/Klooni.java +++ b/core/src/dev/lonami/klooni/Klooni.java @@ -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(), diff --git a/core/src/dev/lonami/klooni/ShareChallenge.java b/core/src/dev/lonami/klooni/ShareChallenge.java index 067e19c..cf00d18 100644 --- a/core/src/dev/lonami/klooni/ShareChallenge.java +++ b/core/src/dev/lonami/klooni/ShareChallenge.java @@ -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 diff --git a/core/src/dev/lonami/klooni/SkinLoader.java b/core/src/dev/lonami/klooni/SkinLoader.java index 1652802..73c2f08 100644 --- a/core/src/dev/lonami/klooni/SkinLoader.java +++ b/core/src/dev/lonami/klooni/SkinLoader.java @@ -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 diff --git a/core/src/dev/lonami/klooni/Theme.java b/core/src/dev/lonami/klooni/Theme.java index 419bde0..90534b2 100644 --- a/core/src/dev/lonami/klooni/Theme.java +++ b/core/src/dev/lonami/klooni/Theme.java @@ -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 diff --git a/core/src/dev/lonami/klooni/actors/Band.java b/core/src/dev/lonami/klooni/actors/Band.java index 24dc3bc..8a86de6 100644 --- a/core/src/dev/lonami/klooni/actors/Band.java +++ b/core/src/dev/lonami/klooni/actors/Band.java @@ -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 diff --git a/core/src/dev/lonami/klooni/actors/EffectCard.java b/core/src/dev/lonami/klooni/actors/EffectCard.java index 096e73c..eaac22e 100644 --- a/core/src/dev/lonami/klooni/actors/EffectCard.java +++ b/core/src/dev/lonami/klooni/actors/EffectCard.java @@ -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 diff --git a/core/src/dev/lonami/klooni/actors/MoneyBuyBand.java b/core/src/dev/lonami/klooni/actors/MoneyBuyBand.java index 57b5fb6..b4e3da6 100644 --- a/core/src/dev/lonami/klooni/actors/MoneyBuyBand.java +++ b/core/src/dev/lonami/klooni/actors/MoneyBuyBand.java @@ -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 diff --git a/core/src/dev/lonami/klooni/actors/ShopCard.java b/core/src/dev/lonami/klooni/actors/ShopCard.java index 4c3ac53..1462dee 100644 --- a/core/src/dev/lonami/klooni/actors/ShopCard.java +++ b/core/src/dev/lonami/klooni/actors/ShopCard.java @@ -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 diff --git a/core/src/dev/lonami/klooni/actors/SoftButton.java b/core/src/dev/lonami/klooni/actors/SoftButton.java index acf1806..78aaf45 100644 --- a/core/src/dev/lonami/klooni/actors/SoftButton.java +++ b/core/src/dev/lonami/klooni/actors/SoftButton.java @@ -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 diff --git a/core/src/dev/lonami/klooni/actors/ThemeCard.java b/core/src/dev/lonami/klooni/actors/ThemeCard.java index 11df2c5..8b37efb 100644 --- a/core/src/dev/lonami/klooni/actors/ThemeCard.java +++ b/core/src/dev/lonami/klooni/actors/ThemeCard.java @@ -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 diff --git a/core/src/dev/lonami/klooni/effects/EvaporateEffectFactory.java b/core/src/dev/lonami/klooni/effects/EvaporateEffectFactory.java index fd61dc8..5a61b59 100644 --- a/core/src/dev/lonami/klooni/effects/EvaporateEffectFactory.java +++ b/core/src/dev/lonami/klooni/effects/EvaporateEffectFactory.java @@ -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 diff --git a/core/src/dev/lonami/klooni/effects/ExplodeEffectFactory.java b/core/src/dev/lonami/klooni/effects/ExplodeEffectFactory.java index 37d727f..a2cb6ca 100644 --- a/core/src/dev/lonami/klooni/effects/ExplodeEffectFactory.java +++ b/core/src/dev/lonami/klooni/effects/ExplodeEffectFactory.java @@ -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); diff --git a/core/src/dev/lonami/klooni/effects/SpinEffectFactory.java b/core/src/dev/lonami/klooni/effects/SpinEffectFactory.java index 92d6986..181bcbe 100644 --- a/core/src/dev/lonami/klooni/effects/SpinEffectFactory.java +++ b/core/src/dev/lonami/klooni/effects/SpinEffectFactory.java @@ -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 diff --git a/core/src/dev/lonami/klooni/effects/VanishEffectFatory.java b/core/src/dev/lonami/klooni/effects/VanishEffectFactory.java similarity index 97% rename from core/src/dev/lonami/klooni/effects/VanishEffectFatory.java rename to core/src/dev/lonami/klooni/effects/VanishEffectFactory.java index 462101a..c976fea 100644 --- a/core/src/dev/lonami/klooni/effects/VanishEffectFatory.java +++ b/core/src/dev/lonami/klooni/effects/VanishEffectFactory.java @@ -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"; diff --git a/core/src/dev/lonami/klooni/effects/WaterdropEffectFactory.java b/core/src/dev/lonami/klooni/effects/WaterdropEffectFactory.java index f82a8ea..7fe7c6a 100644 --- a/core/src/dev/lonami/klooni/effects/WaterdropEffectFactory.java +++ b/core/src/dev/lonami/klooni/effects/WaterdropEffectFactory.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/BaseScorer.java b/core/src/dev/lonami/klooni/game/BaseScorer.java index 5bfa01e..759d600 100644 --- a/core/src/dev/lonami/klooni/game/BaseScorer.java +++ b/core/src/dev/lonami/klooni/game/BaseScorer.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/Board.java b/core/src/dev/lonami/klooni/game/Board.java index 1acda6d..2e6da90 100644 --- a/core/src/dev/lonami/klooni/game/Board.java +++ b/core/src/dev/lonami/klooni/game/Board.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/BonusParticle.java b/core/src/dev/lonami/klooni/game/BonusParticle.java index 6fbee0c..bb8aaed 100644 --- a/core/src/dev/lonami/klooni/game/BonusParticle.java +++ b/core/src/dev/lonami/klooni/game/BonusParticle.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/BonusParticleHandler.java b/core/src/dev/lonami/klooni/game/BonusParticleHandler.java index 10ad254..1cebc23 100644 --- a/core/src/dev/lonami/klooni/game/BonusParticleHandler.java +++ b/core/src/dev/lonami/klooni/game/BonusParticleHandler.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/Cell.java b/core/src/dev/lonami/klooni/game/Cell.java index 742244a..1767e88 100644 --- a/core/src/dev/lonami/klooni/game/Cell.java +++ b/core/src/dev/lonami/klooni/game/Cell.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/GameLayout.java b/core/src/dev/lonami/klooni/game/GameLayout.java index 491eedc..ce142b7 100644 --- a/core/src/dev/lonami/klooni/game/GameLayout.java +++ b/core/src/dev/lonami/klooni/game/GameLayout.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/Piece.java b/core/src/dev/lonami/klooni/game/Piece.java index f16df0f..93a6f69 100644 --- a/core/src/dev/lonami/klooni/game/Piece.java +++ b/core/src/dev/lonami/klooni/game/Piece.java @@ -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; diff --git a/core/src/dev/lonami/klooni/game/PieceHolder.java b/core/src/dev/lonami/klooni/game/PieceHolder.java index 3f147f7..d7c5701 100644 --- a/core/src/dev/lonami/klooni/game/PieceHolder.java +++ b/core/src/dev/lonami/klooni/game/PieceHolder.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/Scorer.java b/core/src/dev/lonami/klooni/game/Scorer.java index a119ddc..fb46de6 100644 --- a/core/src/dev/lonami/klooni/game/Scorer.java +++ b/core/src/dev/lonami/klooni/game/Scorer.java @@ -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 diff --git a/core/src/dev/lonami/klooni/game/TimeScorer.java b/core/src/dev/lonami/klooni/game/TimeScorer.java index 2c2154f..ff75364 100644 --- a/core/src/dev/lonami/klooni/game/TimeScorer.java +++ b/core/src/dev/lonami/klooni/game/TimeScorer.java @@ -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 diff --git a/core/src/dev/lonami/klooni/interfaces/IEffectFactory.java b/core/src/dev/lonami/klooni/interfaces/IEffectFactory.java index 87f1448..4e04412 100644 --- a/core/src/dev/lonami/klooni/interfaces/IEffectFactory.java +++ b/core/src/dev/lonami/klooni/interfaces/IEffectFactory.java @@ -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. *

* 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); } diff --git a/core/src/dev/lonami/klooni/screens/CustomizeScreen.java b/core/src/dev/lonami/klooni/screens/CustomizeScreen.java index 801a1a3..f058052 100644 --- a/core/src/dev/lonami/klooni/screens/CustomizeScreen.java +++ b/core/src/dev/lonami/klooni/screens/CustomizeScreen.java @@ -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 diff --git a/core/src/dev/lonami/klooni/screens/GameScreen.java b/core/src/dev/lonami/klooni/screens/GameScreen.java index 6982a2b..cb05f98 100644 --- a/core/src/dev/lonami/klooni/screens/GameScreen.java +++ b/core/src/dev/lonami/klooni/screens/GameScreen.java @@ -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(); diff --git a/core/src/dev/lonami/klooni/screens/MainMenuScreen.java b/core/src/dev/lonami/klooni/screens/MainMenuScreen.java index 9c17f94..cac16fb 100644 --- a/core/src/dev/lonami/klooni/screens/MainMenuScreen.java +++ b/core/src/dev/lonami/klooni/screens/MainMenuScreen.java @@ -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 diff --git a/core/src/dev/lonami/klooni/screens/PauseMenuStage.java b/core/src/dev/lonami/klooni/screens/PauseMenuStage.java index 668ec73..8c8e5e8 100644 --- a/core/src/dev/lonami/klooni/screens/PauseMenuStage.java +++ b/core/src/dev/lonami/klooni/screens/PauseMenuStage.java @@ -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 diff --git a/core/src/dev/lonami/klooni/screens/ShareScoreScreen.java b/core/src/dev/lonami/klooni/screens/ShareScoreScreen.java index eb20f68..d6645a0 100755 --- a/core/src/dev/lonami/klooni/screens/ShareScoreScreen.java +++ b/core/src/dev/lonami/klooni/screens/ShareScoreScreen.java @@ -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 diff --git a/core/src/dev/lonami/klooni/screens/TransitionScreen.java b/core/src/dev/lonami/klooni/screens/TransitionScreen.java index bdc1c33..f616e09 100644 --- a/core/src/dev/lonami/klooni/screens/TransitionScreen.java +++ b/core/src/dev/lonami/klooni/screens/TransitionScreen.java @@ -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 diff --git a/core/src/dev/lonami/klooni/serializer/BinSerializable.java b/core/src/dev/lonami/klooni/serializer/BinSerializable.java index dcd47df..6fd6dd1 100644 --- a/core/src/dev/lonami/klooni/serializer/BinSerializable.java +++ b/core/src/dev/lonami/klooni/serializer/BinSerializable.java @@ -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 diff --git a/core/src/dev/lonami/klooni/serializer/BinSerializer.java b/core/src/dev/lonami/klooni/serializer/BinSerializer.java index 7776b1b..5ecebee 100644 --- a/core/src/dev/lonami/klooni/serializer/BinSerializer.java +++ b/core/src/dev/lonami/klooni/serializer/BinSerializer.java @@ -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 diff --git a/desktop/build.gradle b/desktop/build.gradle index 3aa724e..d85347e 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -4,7 +4,7 @@ sourceCompatibility = 1.6 sourceSets.main.java.srcDirs = [ "src/" ] project.ext.mainClassName = "dev.lonami.klooni.desktop.DesktopLauncher" -project.ext.assetsDir = new File("../android/assets"); +project.ext.assetsDir = new File("../android/assets") task run(dependsOn: classes, type: JavaExec) { main = project.mainClassName @@ -18,7 +18,7 @@ task dist(type: Jar) { from files(sourceSets.main.output.classesDirs) from files(sourceSets.main.output.resourcesDir) from {configurations.compile.collect {zipTree(it)}} - from files(project.assetsDir); + from files(project.assetsDir) manifest { attributes 'Main-Class': project.mainClassName diff --git a/desktop/src/dev/lonami/klooni/desktop/DesktopLauncher.java b/desktop/src/dev/lonami/klooni/desktop/DesktopLauncher.java index 3b75cff..ee36c78 100644 --- a/desktop/src/dev/lonami/klooni/desktop/DesktopLauncher.java +++ b/desktop/src/dev/lonami/klooni/desktop/DesktopLauncher.java @@ -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 diff --git a/ios/src/dev/lonami/klooni/IOSLauncher.java b/ios/src/dev/lonami/klooni/IOSLauncher.java index e0f3595..44857bd 100644 --- a/ios/src/dev/lonami/klooni/IOSLauncher.java +++ b/ios/src/dev/lonami/klooni/IOSLauncher.java @@ -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