import java.awt.Color; import java.awt.Point; class Player { Point location; int direction; int speed; String name; Color color; boolean hasBall; int score; Player(String n, Color c, Point loc, int dir) { this.location = loc; this.direction = dir; this.speed = 0; this.name = n; this.color = c; this.hasBall = false; this.score = 0; } public String toString() { String s; s = "Player" + " " + this.name + " at " + this.location + " facing " + this.direction + " degrees"; if (this.hasBall) s += " with the ball"; return s; } }