private void setFieldColor(int boardNumber, int w, int k, eFieldStatus status, bool hidden) //zmiana koloru pola { SolidColorBrush brush = new SolidColorBrush(); if (status == eFieldStatus.Empty) { brush.Color = Color.FromRgb(100, 150, 255); } if (status == eFieldStatus.Empty_Missed) { brush.Color = Color.FromRgb(180, 180, 180); } if (status == eFieldStatus.Ship) { if (hidden == true) { brush.Color = Color.FromRgb(100, 150, 255); } else { brush.Color = Color.FromRgb(0, 0, 0); } } if (status == eFieldStatus.Ship_Destoyed) { brush.Color = Color.FromRgb(255, 0, 0); } if (boardNumber == 1) { Rectangle field = (Rectangle)Player1_board.Children[w * Game.BOARD_SIZE + k]; field.Fill = brush; } if (boardNumber == 2) { Rectangle field = (Rectangle)Player2_board.Children[w * Game.BOARD_SIZE + k]; field.Fill = brush; } }
public long Count(eFieldStatus Buffer) { throw new NotImplementedException(); }
public new long Count(eFieldStatus Buffer) { return (long) _pbq.rowcount(); }
public bool SetFieldStatus(eRecordBuffer Buffer, long Record, long Field, eFieldStatus status) { throw new NotImplementedException(); }
public Field(int pos_x = -1, int pos_y = -1, eFieldStatus status = eFieldStatus.Empty) { this.Position_x = pos_x; this.Position_y = pos_y; this.Status = status; }