@@ -33,6 +33,9 @@ public class Game {
3333 private final Map <Integer , Unit > units = new HashMap <>();
3434 private final Set <Integer > visibleUnits = new HashSet <>();
3535
36+ // USER DEFINED
37+ private TextSize textSize = TextSize .Default ;
38+
3639 public Game (final GameData gameData ) {
3740 this .gameData = gameData ;
3841 }
@@ -686,10 +689,9 @@ public Set<Player> observers() {
686689 }
687690
688691
689- //if someone implements the textSize stuff, replace TextSize.Default with getTextSize
690692 public void drawText (final Coordinate ctype , final int x , final int y , final String cstr_format ) {
691693 final int stringId = gameData .addString (cstr_format );
692- addShape (Shape .Text .value , ctype .value , x , y , 0 ,0 , stringId , TextSize . Default .value ,0 ,false );
694+ addShape (Shape .Text .value , ctype .value , x , y , 0 ,0 , stringId , textSize .value ,0 ,false );
693695 }
694696
695697
@@ -1058,12 +1060,17 @@ public boolean hasPath(final Position source, final Position destination) {
10581060 // public boolean setVision(Player player, boolean enabled);
10591061 // public void setGUI(bool enabled);
10601062 // public int getLastEventTime();
1061- // public void setTextSize();
1062- // public void setTextSize(final TextSize size);
10631063 // public boolean setMap(final String cstr_mapFileName);
10641064 // public boolean setRevealAll();return true;
10651065 // public boolean setRevealAll(boolean reveal);
10661066
1067+ public void setTextSize () {
1068+ textSize = TextSize .Default ;
1069+ }
1070+ public void setTextSize (final TextSize size ) {
1071+ textSize = size ;
1072+ }
1073+
10671074 public int elapsedTime () {
10681075 return gameData .elapsedTime ();
10691076 }
0 commit comments