示例#1
0
 public Cell(Point point, DeskColors color, int x, int y, Form form, Board board)
 {
     condition          = Condition.EmptyCalm;
     this.color         = color;
     coordinates        = new Coordinates(point.X, point.Y);
     PositionOnTheField = new Coordinates(x, y);
     figure             = null;
     this.board         = board;
     CreateCell(color, point, form);
 }
示例#2
0
 public void Change()
 {
     ChosenCell.figure.Reset();
     board[PositionOnTheField].figure = ChosenCell.figure;
     this.figure             = ChosenCell.figure;
     this.condition          = Condition.FilledCalm;
     this.cell.Image         = ChosenCell.cell.Image;
     this.cell.SizeMode      = PictureBoxSizeMode.Zoom;
     this.figure.currentcell = this;
     this.figure.current     = PositionOnTheField;
     ChosenCell.condition    = Condition.EmptyCalm;
     ChosenCell.figure       = null;
     SetOneColor(ChosenCell);
     SetOneColor(this);
     ChosenCell.cell.Image = null;
     ChosenCell            = null;
 }