Example #1
0
        //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;
        }
Example #2
0
     public GamePiece GetPiece(GridPos pos)
 {
     return grid[pos.GetX()][ pos.GetY()];
 }