package ee.springdemo; public class Newbie implements Player{ private String name; Weapon weapon; private int x = 0; private int y = 0; public Newbie(Weapon weapon) { this.weapon = weapon; } public String getName() { return name; } public void setName(String name) { this.name = name; } public int getX() { return x; } public void setX(int x) { this.x = x; } public int getY() { return y; } public void setY(int y) { this.y = y; } @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; } }