summaryrefslogtreecommitdiffstats
path: root/core/src/ch/asynk
diff options
context:
space:
mode:
authorSimonIT <simonit.orig@gmail.com>2019-11-30 22:53:20 +0100
committerSimonIT <simonit.orig@gmail.com>2019-11-30 22:53:20 +0100
commitcebc564fa403bb2c215b4833400cbfb283d1077f (patch)
treefe71c71747f7f5cca74bebb4013aeb991366a5dd /core/src/ch/asynk
parent67634ece1a119d0ac05e259ab94cd03c805cda87 (diff)
downloadgdx-boardgame-cebc564fa403bb2c215b4833400cbfb283d1077f.zip
gdx-boardgame-cebc564fa403bb2c215b4833400cbfb283d1077f.tar.gz
remove string format, it's not available on gwt
Diffstat (limited to 'core/src/ch/asynk')
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Path.java7
-rw-r--r--core/src/ch/asynk/gdx/boardgame/Tile.java2
-rw-r--r--core/src/ch/asynk/gdx/boardgame/animations/FireAnimation.java2
-rw-r--r--core/src/ch/asynk/gdx/boardgame/boards/BoardFactory.java2
4 files changed, 7 insertions, 6 deletions
diff --git a/core/src/ch/asynk/gdx/boardgame/Path.java b/core/src/ch/asynk/gdx/boardgame/Path.java
index c7f0b19..10b26c9 100644
--- a/core/src/ch/asynk/gdx/boardgame/Path.java
+++ b/core/src/ch/asynk/gdx/boardgame/Path.java
@@ -3,6 +3,7 @@ package ch.asynk.gdx.boardgame;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.utils.Pool;
import com.badlogic.gdx.utils.Disposable;
+import com.badlogic.gdx.utils.StringBuilder;
import ch.asynk.gdx.boardgame.utils.IterableArray;
@@ -53,10 +54,10 @@ public class Path extends IterableArray<Tile> implements Disposable, Pool.Poolab
@Override public String toString()
{
- String s = String.format(" o:%s\n", finalOrientation);
+ StringBuilder s = new StringBuilder(" o:").append(finalOrientation).append("\n");
for (Tile t : this)
- s += String.format(" %s\n", t.toString());
- return s;
+ s.append(" ").append(t).append("\n");
+ return s.toString();
}
public Tile from()
diff --git a/core/src/ch/asynk/gdx/boardgame/Tile.java b/core/src/ch/asynk/gdx/boardgame/Tile.java
index 5c07866..dda0307 100644
--- a/core/src/ch/asynk/gdx/boardgame/Tile.java
+++ b/core/src/ch/asynk/gdx/boardgame/Tile.java
@@ -39,6 +39,6 @@ public class Tile implements Drawable
@Override public String toString()
{
- return String.format("[%4d, %4d]", (int)x, (int)y);
+ return "[" + x + ", " + y + "]";
}
}
diff --git a/core/src/ch/asynk/gdx/boardgame/animations/FireAnimation.java b/core/src/ch/asynk/gdx/boardgame/animations/FireAnimation.java
index 1bedb10..d8cf5d7 100644
--- a/core/src/ch/asynk/gdx/boardgame/animations/FireAnimation.java
+++ b/core/src/ch/asynk/gdx/boardgame/animations/FireAnimation.java
@@ -104,7 +104,7 @@ public class FireAnimation implements Animation, Pool.Poolable
Config cfg = configs.get(configName);
if (cfg == null) {
- throw new RuntimeException(String.format("FireAnimation : no configuration named : '%s'", configName));
+ throw new RuntimeException("FireAnimation : no configuration named : '" + configName + "'");
}
a.compute(cfg, x0, y0, x1, y1);
diff --git a/core/src/ch/asynk/gdx/boardgame/boards/BoardFactory.java b/core/src/ch/asynk/gdx/boardgame/boards/BoardFactory.java
index 8eba838..54eaf38 100644
--- a/core/src/ch/asynk/gdx/boardgame/boards/BoardFactory.java
+++ b/core/src/ch/asynk/gdx/boardgame/boards/BoardFactory.java
@@ -41,7 +41,7 @@ public class BoardFactory
break;
}
if (board == null) {
- throw new RuntimeException( String.format("%s board type is not implemented yet.", boardType) );
+ throw new RuntimeException(boardType + " board type is not implemented yet.");
}
Orientation.setValues(board.getAngles());