package cicaprojekt;

import java.io.IOException;

public class GateDrawer extends AbstractDrawer {
    Gate gate;
    
    public GateDrawer(Gate g) throws IOException {
        super("Gate.png");
        gate = g;
    }
    
    @Override
    public void draw() throws IOException {
        if(gate.isOpen())
            changeImage("OpenGate.png");  
        else 
            changeImage("Gate.png"); 
    }
    
    @Override
    public int getTileX() {
        return gate.getX();
    }
    
    @Override
    public int getTileY() {
        return gate.getY();
    }

}
