private static void testGridSetColor() { Grid grid = new Grid(20, 20); grid.setColor(4, 7, ConsoleColor.Green); grid.setColor(13, 19, ConsoleColor.Red); grid.print(); }
public override void put(Grid grid) { base.put(grid); switch (this.direction) { case Direction.LEFT: grid.setColor(this.x - 1, this.y, this.color); break; case Direction.RIGHT: grid.setColor(this.x + 1, this.y, this.color); break; case Direction.TOP: grid.setColor(this.x, this.y - 1, this.color); break; case Direction.BOTTOM: grid.setColor(this.x, this.y + 1, this.color); break; } }
public virtual void put( Grid grid ) { grid.setColor(this.x, this.y, this.color); }