/// module Forest{ export let Pond = new RoomRandom("Pond", false, true); export let PondCoordinates = Forest.rnc.generate(-1,1, 1, 4); Pond.backgroundImage = "roomPond"; } Forest.region.place(Forest.Pond); Forest.Pond.trickyCode = (options : TrickyOptions) => { let blocked = !options.map.isFree(Forest.PondCoordinates[0], Forest.PondCoordinates[1]); while (blocked) { Forest.PondCoordinates[1] += 1; blocked = !options.map.isFree(Forest.PondCoordinates[0], Forest.PondCoordinates[1]); if (blocked) { Forest.PondCoordinates[0] += 1; blocked = !options.map.isFree(Forest.PondCoordinates[0], Forest.PondCoordinates[1]); } } return options.x == Forest.PondCoordinates[0] && options.y == Forest.PondCoordinates[1]; };