private void DrawCell(Coord mazeCoord) { Coord pixCoord = new Coord(mazeCoord.X * MULTIPLIER + OFFSET, mazeCoord.Y * MULTIPLIER + OFFSET + 1, mazeCoord.Z * MULTIPLIER + OFFSET); Cell cell = grid[mazeCoord]; foreach (Direction d in allDirections) { if (cell.GetPassage(d)) { DrawPassage(pixCoord, cell, d); } else { if (BOUNCERS && d.Dy == -1 && cell.GetPassage(d.Opposite)) { DrawBouncer(pixCoord, cell, d); } else { DrawWall(pixCoord, cell, d); } } } }
private void DrawCell(Coord coord) { int pixX = coord.X * 2 + 1, pixY = coord.Y * 2 + 1; pixels[pixX, pixY] = ' '; Cell cell = grid[coord]; if (cell.GetPassage(new Direction(-1, 0, 0))) { pixels[pixX - 1, pixY] = ' '; } if (cell.GetPassage(new Direction(1, 0, 0))) { pixels[pixX + 1, pixY] = ' '; } if (cell.GetPassage(new Direction(0, -1, 0))) { pixels[pixX, pixY - 1] = ' '; } if (cell.GetPassage(new Direction(0, 1, 0))) { pixels[pixX, pixY + 1] = ' '; } }