public Piece(string shape) { StringToMatrix s2m = new StringToMatrix(shape); blocks = s2m.blocks; rows = s2m.rows; columns = s2m.columns; }
public Piece(string piece) { StringToMatrix s_m = new StringToMatrix(piece); blocks = s_m.blocks; rows = s_m.rows; cols = s_m.cols; }
public void FromString(string s) { StringToMatrix converter = new StringToMatrix(s); board = converter.blocks; rows = converter.rows; columns = converter.columns; }
public Piece(string shape) { StringToMatrix s = new StringToMatrix(shape); this.rows = s.rows; this.columns = s.columns; this.blocks = s.matrix; }
public void FromString(string blocks) { StringToMatrix stm = new StringToMatrix(blocks); this.board = stm.matrix; this.rows = stm.rows; this.columns = stm.columns; }
public Piece(string s) // convert a "...\n...\n...\n" string into a matrix { StringToMatrix s2m = new StringToMatrix(s); blocks = s2m.blocks; rows = s2m.rows; columns = s2m.columns; }
public void FromString(string blocks) { StringToMatrix sm = new StringToMatrix(blocks); board = sm.blocks; Rows = sm.rows; Cols = sm.cols; }
public void FromString(String blocks) { StringToMatrix converter = new StringToMatrix(blocks); board = converter.blocks; Rows = converter.rows; Columns = converter.columns; }
public override String ToString() { char[,] curr_board = new char[Rows(), Columns()]; for (int r = 0; r < Rows(); r++) { for (int c = 0; c < Columns(); c++) { if ((fallingBlock is object) && fallingBlock.IsAt(r, c)) { curr_board[r, c] = fallingBlock.CellAt(r, c); } else { curr_board[r, c] = board[r, c]; } } } return(StringToMatrix.Inverse(curr_board, Rows(), Columns())); }
public override String ToString() { return(StringToMatrix.Inverse(blocks, rows, cols)); }
public override string ToString() { return(StringToMatrix.Inverse(this.blocks, this.Rows(), this.Columns())); }
public override string ToString() { return(StringToMatrix.Inverse(blocks, Rows(), Columns())); }