예제 #1
0
 private static void testGridSetColor()
 {
     Grid grid = new Grid(20, 20);
     grid.setColor(4, 7, ConsoleColor.Green);
     grid.setColor(13, 19, ConsoleColor.Red);
     grid.print();
 }
예제 #2
0
 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;
     }
 }
예제 #3
0
파일: Shape.cs 프로젝트: davidbedok/oeprog2
 public virtual void put( Grid grid )
 {
     grid.setColor(this.x, this.y, this.color);
 }