/// <reference path="../Forest.ts" />
module Forest{
    export let WitchHut = new RoomRandom("The Witch's Hut", false, true);
    export let WitchCoordinates = Forest.rnc.generate(-2,2, 2, 4);
    WitchHut.backgroundImage = "roomWitch";
}
Forest.region.place(Forest.WitchHut);

Forest.WitchHut.trickyCode = (options : TrickyOptions) => {
    let blocked = !options.map.isFree(Forest.WitchCoordinates[0], Forest.WitchCoordinates[1]);
    while (blocked) {
        Forest.WitchCoordinates[1] += 1;
        blocked = !options.map.isFree(Forest.WitchCoordinates[0], Forest.WitchCoordinates[1]);
    }
    return options.x == Forest.WitchCoordinates[0] && options.y == Forest.WitchCoordinates[1];
};