public Coordonnate Select() { var coordX = new Expression(relativeCoord.CoordXCalculation()); coordX.Parameters["x"] = baseCoord.CoordX(); var coordY = new Expression(relativeCoord.CoordYCalculation()); coordY.Parameters["y"] = baseCoord.CoordY(); return(new Coordonnate((int)coordX.Evaluate(), (int)coordY.Evaluate())); }
public IEnumerable <Coordonnate> Coordonnates() { return (new List <Coordonnate>() { new Coordonnate(cellCoordonnates.CoordX() - 1, cellCoordonnates.CoordY() - 1), new Coordonnate(cellCoordonnates.CoordX(), cellCoordonnates.CoordY() - 1), new Coordonnate(cellCoordonnates.CoordX() + 1, cellCoordonnates.CoordY() - 1), new Coordonnate(cellCoordonnates.CoordX() + 1, cellCoordonnates.CoordY()), new Coordonnate(cellCoordonnates.CoordX() + 1, cellCoordonnates.CoordY() + 1), new Coordonnate(cellCoordonnates.CoordX(), cellCoordonnates.CoordY() + 1), new Coordonnate(cellCoordonnates.CoordX() - 1, cellCoordonnates.CoordY() + 1), new Coordonnate(cellCoordonnates.CoordX() - 1, cellCoordonnates.CoordY()), }); }
public bool Matche(Coordonnate coord) { return(this.coordonnate.CoordX() == coord.CoordX() && this.coordonnate.CoordY() == coord.CoordY()); }