//sets the character at the defined position and returns the previous character. public GamePiece SetPiece(GridPos pos, GamePiece newchar) { GamePiece oldPiece = grid[pos.GetX()][pos.GetY()]; grid[pos.GetX()][pos.GetY()] = newchar; return oldPiece; }
public GamePiece GetPiece(GridPos pos) { return grid[pos.GetX()][ pos.GetY()]; }