package ee.springdemo; public class Newbie implements Player { String name; Weapon weapon; int x = 0, y = 0; public Newbie(Weapon weapon) { this.weapon = weapon; } @Override public void setName(String name) { this.name = name; } @Override public String getName() { return this.name; } @Override public void setWeapon(Weapon weapon) { this.weapon = weapon; } @Override public Weapon getWeapon() { return weapon; } @Override public void beginGame() { System.out.println("I'm just newbie. Learning to fight with " + weapon.getName()); } @Override public void endGame() { System.out.println("I'm still a newbie and I'm dying " + "already..."); } @Override public void move(int xChange, int yChange) { this.x += xChange; this.y += yChange; } }