From f8d7d57a1fdd661b4e771e80d045c12ea57f9725 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Zurcher?= Date: Fri, 17 Oct 2014 09:22:33 +0200 Subject: Army: add String and toString() --- core/src/ch/asynk/tankontank/game/Army.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/ch/asynk/tankontank/game/Army.java b/core/src/ch/asynk/tankontank/game/Army.java index 66c6b4f..852dbe9 100644 --- a/core/src/ch/asynk/tankontank/game/Army.java +++ b/core/src/ch/asynk/tankontank/game/Army.java @@ -2,10 +2,17 @@ package ch.asynk.tankontank.game; public enum Army { - GE, US; + GE("German"), US("US"); + private String s; + Army(String s) { this.s = s; } public boolean isEnemy(Army other) { return (this != other); } + + public String toString() + { + return s; + } } -- cgit v1.1-2-g2b99