Ejemplo n.º 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;
        }
Ejemplo n.º 2
0
     public GamePiece GetPiece(GridPos pos)
 {
     return grid[pos.GetX()][ pos.GetY()];
 }