@Override
    protected void paintComponent(Graphics g) {
        Graphics2D g2d = (Graphics2D) g;
        g2d.setColor(Color.white);
        width = 500;                     //todo
        height = 500;
        g.fillRect(0, 0, width, height);
        g2d.setColor(Color.black);
        g2d.drawRect(0, 0, width - 1, height - 1);
        g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
        g2d.setColor(color);
        g2d.scale(scale, scale);

        for (int i = 0; i < vectors[0].length; i++) {
            if (vectors[time][i].getBeing().isHuman()){
                g.setColor(Color.black);
            } else if (vectors[time][i].getBeing().isZombie()) {
                g.setColor(Color.red);
            } else {
                g.setColor(Color.green);
            }
            g.fillRect((int) (vectors[time][i].getX()*(width-2)/10 - 1.5), (int) (vectors[time][i].getY()*(height-2)/10 - 1.5), 3, 3);
        }
        g.setColor(Color.black);
        for (Wall wall: animation.field.getWalls()){
            g.drawLine((int) (((double)width - 2) / 10 * wall.getX1()), (int) (((double)height - 2) / 10 * wall.getY1()), (int) (((double)width - 2) / 10 * wall.getX2()), (int) (((double)height - 2) / 10 * wall.getY2()));
        }
        if (isDrawingALine){
            g.fillRect(xPositionOfLine-2, yPositionOfLine-2, 4, 4);
        }
    }