solved s08 ex02
This commit is contained in:
parent
4f074266f2
commit
2a06e452cc
21
08/src/main/java/ch/zhaw/ads/ServerGraphicsExercise.java
Normal file
21
08/src/main/java/ch/zhaw/ads/ServerGraphicsExercise.java
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
package ch.zhaw.ads;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
|
||||||
|
public class ServerGraphicsExercise implements CommandExecutor {
|
||||||
|
ServerGraphics serverGraphics;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String execute(String command) {
|
||||||
|
serverGraphics = new ServerGraphics();
|
||||||
|
|
||||||
|
serverGraphics.setColor(Color.BLACK);
|
||||||
|
serverGraphics.drawLine(0.01, 0.01, 0.5, 0.99);
|
||||||
|
serverGraphics.drawLine(0.5, 0.99, 0.99, 0.01);
|
||||||
|
serverGraphics.drawLine(0.01, 0.01, 0.99, 0.01);
|
||||||
|
|
||||||
|
serverGraphics.setColor(Color.RED);
|
||||||
|
serverGraphics.drawRect(0.01, 0.01, 0.99, 0.99);
|
||||||
|
return serverGraphics.getTrace();
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user