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();
    }
}
