Skip to content

Commit

Permalink
docs(Jart): change the type of the variable from Image to `Displaya…
Browse files Browse the repository at this point in the history
…ble`
  • Loading branch information
Hamzaelkhatri authored Jul 28, 2023
1 parent 65432f0 commit b1fed30
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions subjects/java/raids/Jart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,19 @@ interface Drawable {

public class Main {
public static void main(String[] args) {
Image displayable = new Image(1000, 1000);
Displayable image = new Image(1000, 1000);
Rectangle rectangle = new Rectangle(new Point(50, 50), new Point(300, 200));
rectangle.draw(displayable);
rectangle.draw(image);
Triangle triangle = new Triangle(new Point(100, 100), new Point(900, 900), new Point(100, 900));
triangle.draw(displayable);
triangle.draw(image);

for (int i = 0; i < 50; i++) {
Circle circle = Circle.random(image.getWidth(), image.getHeight());
circle.draw(displayable);
Circle circle = Circle.random(((Image) image).getWidth(), ((Image) image).getHeight());
circle.draw(image);
}
displayable.save("image.png");
image.save("image.png");
}
}

```


Expand Down

0 comments on commit b1fed30

Please sign in to comment.