import java.awt.*; public class Knight { // instance variables - replace the example below with your own private String knight; private int x,y, size, gap; private Font font; /** * Constructor for objects of class Knight */ public Knight(int x, int y) { knight = Character.toString (9822);//unicode 0x265E setLocation(x,y); font = new Font("Helvetica", Font.PLAIN, 72); } public void setLocation(int x, int y) { this.x = x; this.y = y; } public int getX() {return x;} public int getY() {return y;} public void draw(Graphics g, int sx, int sy) { g.setColor(Color.WHITE); g.setFont(font); g.drawString(knight,sx,sy); } public String toString() { return knight+ " at [" + x + "][" + y + "]"; } }