예제 #1
0
        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()));
        }
예제 #2
0
 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()),
     });
 }
예제 #3
0
 public bool Matche(Coordonnate coord)
 {
     return(this.coordonnate.CoordX() == coord.CoordX() && this.coordonnate.CoordY() == coord.CoordY());
 }