drawPolygon(int xPoints,
int yPoints,
int nPoints)
i found this, but i dont knew how to use it. Could you help me?
public MyWorld()
{
super(300, 300, 1);
GreenfootImage img = new GreenfootImage(300, 300);
img.setColor(Color.WHITE);
img.fill();
img.setColor(Color.BLACK);
img.drawPolygon(new int[] {100, 100, 200}, new int[] {100, 200, 100}, 3);
setBackground(img);
}drawPolygon(int[] xPoints,
int[] yPoints,
int nPoints)GreenfootImage image = new GreenfootImage(100, 100);
int[] xPoints = new int[] { 0, 99, 0 };
int[] yPoints = new int[] { 99, 99, 0 };
image.drawPolygon(xPoints, yPoints, 3);