public bool IsPassable(Point position) { if (position.X < 0 || position.X >= this.gridSizeX || position.Y < 0 || position.Y >= this.gridSizeY) { return(false); } else { if (!passableGrid[position.X, position.Y]) { Game1.newGameText.Add("The way is blocked"); Game1.gameTextDelay = 5; return(false); } else if (!gameObjectList.CheckIfPassable(position)) { Game1.newGameText.Add("The way is blocked"); Game1.gameTextDelay = 5; return(false); } else { return(true); } } }