예제 #1
0
    /// <summary>
    /// Creates an occupation association between this GamePiece and the passed in GameTile.
    /// </summary>
    /// <param name="tile">The tile to occupy.</param>
    public virtual void OccupyTile(GameTile tile)
    {
        if (_occupiedTile != null)
        {
            _occupiedTile.RemoveOccupier(this);
        }

        _occupiedTile = tile;
        tile.AddOccupier(this);

        InteractWithPiecesOnTile(tile);
    }