From 25305760c5dfcda6dbe5594379baa12d4bc2ff46 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Tue, 12 Nov 2024 22:32:55 +0100 Subject: [PATCH 01/43] added Player --- .../java/pp/monopoly/game/server/Player.java | 115 +++++++++++++++++- 1 file changed, 113 insertions(+), 2 deletions(-) diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java index 67b6791..c4f240a 100644 --- a/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/game/server/Player.java @@ -7,9 +7,120 @@ package pp.monopoly.game.server; +import java.util.List; + +import com.jme3.math.ColorRGBA; + +import pp.monopoly.model.FieldVisitor; +import pp.monopoly.model.Figure; +import pp.monopoly.model.fields.BuildingProperty; +import pp.monopoly.model.fields.EventField; +import pp.monopoly.model.fields.FoodField; +import pp.monopoly.model.fields.GateField; +import pp.monopoly.model.fields.GoField; +import pp.monopoly.model.fields.GulagField; +import pp.monopoly.model.fields.PropertyField; +import pp.monopoly.model.fields.TestStreckeField; +import pp.monopoly.model.fields.WacheField; + /** * Class representing a player */ -public class Player { - +public class Player implements FieldVisitor{ + private String name; + private ColorRGBA color; + private int accountBalance = 0; + private Figure figure; + private List properties; + private int getOutOfJailCard; + private int fieldID; + + Player(String name, ColorRGBA color) { + this.name = name; + this.color = color; + figure = new Figure(); + } + + public int move(int steps){ + return fieldID += steps; + } + + public void buyProperty(PropertyField property) { + properties.add(property); + } + + public void sellProperty(PropertyField property) { + properties.remove(property); + } + + public void payRent(int amount) { + accountBalance -= amount; + } + + public void earnMoney(int amount) { + accountBalance += amount; + } + + public String getName() { + return name; + } + + public void addJailCard() { + getOutOfJailCard++; + } + + public void removeJailCard() { + if (getOutOfJailCard ==0) { + throw new IllegalStateException("Has no JailCard to remove"); + } + getOutOfJailCard--; + } + + @Override + public Void visit(BuildingProperty field) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + @Override + public Void visit(FoodField field) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + @Override + public Void visit(GateField field) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + @Override + public Void visit(GulagField field) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + @Override + public Void visit(TestStreckeField field) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + @Override + public Void visit(EventField field) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + @Override + public Void visit(WacheField field) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + @Override + public Void visit(GoField field) { + accountBalance += 4000; + return null; + } } From dca23151a88f3596f31ed4a4f00875f79c723d81 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Tue, 12 Nov 2024 22:33:10 +0100 Subject: [PATCH 02/43] added Visitors --- .../java/pp/monopoly/model/CardVisitor.java | 7 +++++++ .../java/pp/monopoly/model/FieldVisitor.java | 21 +++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/CardVisitor.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/FieldVisitor.java diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/CardVisitor.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/CardVisitor.java new file mode 100644 index 0000000..257f81f --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/CardVisitor.java @@ -0,0 +1,7 @@ +package pp.monopoly.model; + +import pp.monopoly.model.card.Card; + +public interface CardVisitor { + T visit(Card c); +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/FieldVisitor.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/FieldVisitor.java new file mode 100644 index 0000000..85caf25 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/FieldVisitor.java @@ -0,0 +1,21 @@ +package pp.monopoly.model; + +import pp.monopoly.model.fields.BuildingProperty; +import pp.monopoly.model.fields.EventField; +import pp.monopoly.model.fields.FoodField; +import pp.monopoly.model.fields.GateField; +import pp.monopoly.model.fields.GoField; +import pp.monopoly.model.fields.GulagField; +import pp.monopoly.model.fields.TestStreckeField; +import pp.monopoly.model.fields.WacheField; + +public interface FieldVisitor { + T visit(BuildingProperty field); + T visit(FoodField field); + T visit(GateField field); + T visit(GulagField field); + T visit(TestStreckeField field); + T visit(EventField field); + T visit(WacheField field); + T visit(GoField field); +} From 65c85aacf057439f34322c352d7a0b126f711b9e Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Tue, 12 Nov 2024 22:34:46 +0100 Subject: [PATCH 03/43] started UC-gameplay-15 --- .../java/pp/monopoly/model/card/Card.java | 23 +++++++++++++ .../pp/monopoly/model/card/DeckHelper.java | 34 +++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java new file mode 100644 index 0000000..95e07d1 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/Card.java @@ -0,0 +1,23 @@ +package pp.monopoly.model.card; + +public class Card { + private final String description; + private final String keyword; + + Card(String description, String keyword) { + this.description = description; + this.keyword = keyword; + } + + public void accept(DeckHelper visitor) { + visitor.visit(this); + } + + String getDescription() { + return description; + } + + String getKeyword() { + return keyword; + } +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java new file mode 100644 index 0000000..a270fd6 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/card/DeckHelper.java @@ -0,0 +1,34 @@ +package pp.monopoly.model.card; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Queue; + +import pp.monopoly.model.CardVisitor; + +public class DeckHelper implements CardVisitor{ + + private static Queue cards; + + private DeckHelper() { + + } + + @Override + public Void visit(Card c) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'visit'"); + } + + private void shuffle() { + List cardList = new ArrayList<>(cards); + Collections.shuffle(cardList); + cards.clear(); + cards.addAll(cardList); + } + + public static Card drawCard() { + return cards != null ? cards.poll() : null; + } +} From 81731247c746ced139f890e1ea42aebbac8a9f69 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Tue, 12 Nov 2024 22:35:41 +0100 Subject: [PATCH 04/43] added Fields --- .../model/fields/BuildingProperty.java | 59 +++++++++++++++++++ .../pp/monopoly/model/fields/EventField.java | 23 ++++++++ .../java/pp/monopoly/model/fields/Field.java | 19 ++++++ .../pp/monopoly/model/fields/FoodField.java | 21 +++++++ .../pp/monopoly/model/fields/GateField.java | 21 +++++++ .../pp/monopoly/model/fields/GoField.java | 15 +++++ .../pp/monopoly/model/fields/GulagField.java | 18 ++++++ .../monopoly/model/fields/PropertyField.java | 25 ++++++++ .../model/fields/TestStreckeField.java | 24 ++++++++ .../pp/monopoly/model/fields/WacheField.java | 16 +++++ 10 files changed, 241 insertions(+) create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java new file mode 100644 index 0000000..01cf896 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/BuildingProperty.java @@ -0,0 +1,59 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public class BuildingProperty extends PropertyField { + + private int houses; + private boolean hotel = false; + + BuildingProperty(String name, int id, int price, int rent) { + super(name, id, price, rent); + } + + @Override + protected int calcRent() { + if(!hotel) { + return rent*houses; + } else { + return rent*6; + } + } + + public boolean buildHouse() { + if (houses < 4) { + houses++; + return true; + } + return false; + } + + public boolean buildHotel() { + if (hotel) { + return false; + } + hotel = true; + return true; + } + + public boolean removeHouse() { + if (houses == 0) { + return false; + } + houses--; + return true; + } + + public boolean removeHotel() { + if (!hotel) { + return false; + } + hotel = false; + return true; + } + + @Override + public void accept(Player player) { + player.visit(this); + } +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java new file mode 100644 index 0000000..0035755 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/EventField.java @@ -0,0 +1,23 @@ +package pp.monopoly.model.fields; + + +import pp.monopoly.game.server.Player; +import pp.monopoly.model.card.Card; +import pp.monopoly.model.card.DeckHelper; + +public class EventField extends Field{ + + public EventField(int id) { + super("EreignissFeld", id); + } + + @Override + public void accept(Player player) { + player.visit(this); + } + + public Card drawCard() { + return DeckHelper.drawCard(); + } + +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java new file mode 100644 index 0000000..841142a --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/Field.java @@ -0,0 +1,19 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +abstract class Field { + protected final String name; + protected final int id; + + protected Field(String name, int id) { + this.name = name; + this.id= id; + } + + public abstract void accept(Player player); + + public int getId() { + return id; + } +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java new file mode 100644 index 0000000..efa3eb4 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/FoodField.java @@ -0,0 +1,21 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public class FoodField extends PropertyField { + + public FoodField(String name, int id) { + super(name, id, 1500,0); + } + + @Override + protected int calcRent() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'calcRent'"); + } + + @Override + public void accept(Player player) { + player.visit(this); + } +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java new file mode 100644 index 0000000..6e8440a --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GateField.java @@ -0,0 +1,21 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public class GateField extends PropertyField{ + + GateField(String name, int id) { + super(name, id, 2000, 25); + } + + @Override + protected int calcRent() { + return rent; + } + + @Override + public void accept(Player player) { + player.visit(this); + } + +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java new file mode 100644 index 0000000..09c6c58 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GoField.java @@ -0,0 +1,15 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public class GoField extends Field{ + + public GoField() { + super("Monatsgehalt", 0); + } + + @Override + public void accept(Player player) { + player.visit(this); + } +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java new file mode 100644 index 0000000..172a1f4 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/GulagField.java @@ -0,0 +1,18 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public class GulagField extends Field{ + + private int bailCost = 500; + + GulagField() { + super("Gulag", 10); + } + + @Override + public void accept(Player player) { + player.visit(this); + } + +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java new file mode 100644 index 0000000..b8d6438 --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/PropertyField.java @@ -0,0 +1,25 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public abstract class PropertyField extends Field { + + private final int price; + protected final int rent; + private Player owner; + private boolean mortaged = false; + + protected PropertyField(String name, int id, int price, int rent) { + super(name, id); + this.price = price; + this.rent = rent; + } + + + protected abstract int calcRent(); + + public int getPrice() { + return price; + } + +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java new file mode 100644 index 0000000..89da7dc --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/TestStreckeField.java @@ -0,0 +1,24 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public class TestStreckeField extends Field{ + private int money; + + TestStreckeField() { + super("Teststrecke", 20); + } + + @Override + public void accept(Player player) { + player.visit(this); + } + + public void addMoney(int amount) { + money += amount; + } + + public int collectMoney() { + return money = 0; + } +} diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java new file mode 100644 index 0000000..ca0abaf --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/fields/WacheField.java @@ -0,0 +1,16 @@ +package pp.monopoly.model.fields; + +import pp.monopoly.game.server.Player; + +public class WacheField extends Field{ + + public WacheField() { + super("Wache", 30); + } + + @Override + public void accept(Player player) { + player.visit(this); + } + +} From 2cc1a338ec5a216cd1bfeba7fbf0f0e6d7504f11 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Tue, 12 Nov 2024 22:36:02 +0100 Subject: [PATCH 05/43] added Figure to Player for visual representation --- .../src/main/java/pp/monopoly/model/Figure.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Projekte/monopoly/model/src/main/java/pp/monopoly/model/Figure.java diff --git a/Projekte/monopoly/model/src/main/java/pp/monopoly/model/Figure.java b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/Figure.java new file mode 100644 index 0000000..b27f06f --- /dev/null +++ b/Projekte/monopoly/model/src/main/java/pp/monopoly/model/Figure.java @@ -0,0 +1,17 @@ +package pp.monopoly.model; + +public class Figure implements Item{ + + @Override + public T accept(Visitor visitor) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'accept'"); + } + + @Override + public void accept(VoidVisitor visitor) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'accept'"); + } + +} From 7ee22737615dce1028f91d6bba13e3db5437c215 Mon Sep 17 00:00:00 2001 From: Johannes Schmelz Date: Wed, 13 Nov 2024 12:42:37 +0000 Subject: [PATCH 06/43] First compileable version of Client --- .../main/java/pp/dialog/DialogManager.java | 4 +- .../Interface/Lemur/pp-styles.groovy | 29 ++++- .../java/pp/monopoly/client/GameSound.java | 35 +----- .../java/pp/monopoly/client/MonopolyApp.java | 4 +- .../java/pp/monopoly/client/StartMenu.java | 117 ++++++++++++++++++ .../java/pp/monopoly/client/gui/GameMenu.java | 50 ++++++++ .../main/resources/Pictures/logo-monopoly.png | Bin 0 -> 45160 bytes .../main/resources/Pictures/logo-unibw.png | Bin 0 -> 45063 bytes .../main/resources/Pictures/unibw-Bib.jpeg | Bin 0 -> 148009 bytes .../monopoly/game/client/ClientGameLogic.java | 4 +- .../src/main/resources/monopoly.properties | 35 +++++- .../src/main/resources/monopoly_de.properties | 35 +++++- 12 files changed, 270 insertions(+), 43 deletions(-) create mode 100644 Projekte/monopoly/client/src/main/java/pp/monopoly/client/StartMenu.java create mode 100644 Projekte/monopoly/client/src/main/java/pp/monopoly/client/gui/GameMenu.java create mode 100644 Projekte/monopoly/client/src/main/resources/Pictures/logo-monopoly.png create mode 100644 Projekte/monopoly/client/src/main/resources/Pictures/logo-unibw.png create mode 100644 Projekte/monopoly/client/src/main/resources/Pictures/unibw-Bib.jpeg diff --git a/Projekte/jme-common/src/main/java/pp/dialog/DialogManager.java b/Projekte/jme-common/src/main/java/pp/dialog/DialogManager.java index ca0069e..f84b6e7 100644 --- a/Projekte/jme-common/src/main/java/pp/dialog/DialogManager.java +++ b/Projekte/jme-common/src/main/java/pp/dialog/DialogManager.java @@ -111,7 +111,7 @@ public class DialogManager { * * @param dialog the dialog to open */ - void open(Dialog dialog) { + public void open(Dialog dialog) { dialogStack.push(dialog); dialog.update(); app.getGuiNode().attachChild(dialog); @@ -133,7 +133,7 @@ public class DialogManager { * @param dialog the dialog to close * @throws IllegalArgumentException if the specified dialog is not the top dialog */ - void close(Dialog dialog) { + public void close(Dialog dialog) { if (!isTop(dialog)) throw new IllegalArgumentException(dialog + " is not the top dialog"); dialogStack.pop(); diff --git a/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy b/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy index c8c8de4..55ef6cb 100644 --- a/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy +++ b/Projekte/jme-common/src/main/resources/Interface/Lemur/pp-styles.groovy @@ -10,15 +10,22 @@ import com.simsilica.lemur.Insets3f import com.simsilica.lemur.component.QuadBackgroundComponent import com.simsilica.lemur.component.TbtQuadBackgroundComponent -def bgColor = color(0.25, 0.5, 0.5, 1) +def bgColor = color(1, 1, 1, 1) def buttonEnabledColor = color(0.8, 0.9, 1, 1) def buttonDisabledColor = color(0.8, 0.9, 1, 0.2) -def buttonBgColor = color(0, 0.75, 0.75, 1) +//def buttonBgColor = color(0, 0.75, 0.75, 1) def sliderColor = color(0.6, 0.8, 0.8, 1) def sliderBgColor = color(0.5, 0.75, 0.75, 1) def gradientColor = color(0.5, 0.75, 0.85, 0.5) def tabbuttonEnabledColor = color(0.4, 0.45, 0.5, 1) +def playButtonBorderColor = color(1, 0.6, 0, 1) // Orange border for "Spielen" button +def playButtonTextColor = color(0, 0, 0, 1) // Black text color for "Spielen" button +def buttonBgColor = color(1, 1, 1, 1) // White background for "Spiel beenden" and "Einstellungen" buttons +def buttonTextColor = color(0, 0, 0, 1) // Black text color for "Spiel beenden" and "Einstellungen" buttons +def borderColor = color(0, 0, 0, 1) // Black border for "Spiel beenden" and "Einstellungen" + + def gradient = TbtQuadBackgroundComponent.create( texture(name: "/com/simsilica/lemur/icons/bordered-gradient.png", generateMips: false), @@ -55,6 +62,24 @@ selector("slider", "pp") { background.setColor(bgColor) } +selector("play-button", "pp") { + color = playButtonTextColor // Black text color + background = new QuadBackgroundComponent(playButtonBorderColor) // Orange border background + insets = new Insets3f(15, 25, 15, 25) // Padding for larger button size + background.setMargin(5, 5) // Thin border effect around the background color + fontSize = 36 // Larger font size for prominence +} + +selector("menu-button", "pp") { + color = buttonTextColor // Black text color + background = new QuadBackgroundComponent(buttonBgColor) // White background + insets = new Insets3f(10, 20, 10, 20) // Padding + background.setMargin(1, 1) // Thin black border + background.setColor(borderColor) // Set black border color + + fontSize = 24 // Standard font size +} + def pressedCommand = new Command