@@ -0,0 +1,982 @@
+%0Apublic class Chess %7B%0A    Location nowLoc;%0A    Integer color;%0A    Integer step;%0A%0A    public Chess(Integer color)%7B%0A        this.setColor(color);%0A    %7D%0A%0A    public void setNowLoc()%7B%0A%0A    %7D%0A%0A    public Location getNowLoc()%7B%0A        return new Location(this.nowLoc);%0A    %7D%0A%0A    public void setColor(Integer color)%7B%0A        this.color = color;%0A    %7D%0A%0A    public Integer getColor()%7B%0A        return this.color;%0A    %7D%0A%0A    public void setStep()%7B%0A%0A    %7D%0A%0A    public Integer getStep()%7B%0A        return this.step;%0A    %7D%0A%0A%7D%0A%0Aclass Location%7B%0A    Integer x, y;%0A%0A    public Location(Integer x, Integer y)%7B%0A        this.x = new Integer(x);%0A        this.y = new Integer(y);%0A    %7D%0A%0A    public Location(Location loc)%7B%0A        this.x = loc.getX();%0A        this.y = loc.getY();%0A    %7D%0A%0A    public Integer getX()%7B%0A        return this.x;%0A    %7D%0A%0A    public Integer getY()%7B%0A        return this.y;%0A    %7D%0A%7D%0A%0Aclass ChessFactory%7B%0A    public Chess makeChess(Integer color)%7B%0A        return new Chess(color);%0A    %7D%0A%7D

Add Chess