It's tough man, especially since you have to see them all the time. People say "forget her and focus on other girls" and that's the right thing to do, but let's be realistic, she's there. Every day. You're going to keep seeing each other and the attraction on your end is going to get bigger and bigger. This is how drama starts.
No, it isn't easy. But the mindset I would suggest you adopt, is that if she hooks up with your friend (probably won't happen) you are TOTALLY COOL WITH THAT. You don't care. It's just a game anyway. You show her that you don't need to compete with other guys because you are the only you, and there is no competition for that.
When you're meeting a girl at a club or just at a bookstore or something, yes, that's the time to take initiative. But this isn't like that. She's not going anywhere. So you don't have to do all that courting stuff.
No more, "yeah I'll be right back". You've got things to do. Believe me, if she wants to be around you, she WILL be there. She may try to wait you out, to see if you're going to react first, don't. Make her come to you, always.
When she IS around you, be cool, have fun, make her feel comfortable, tease her, whatever. That's her reward.
I would say be very cautious with this. Doesn't mean you can't have some fun. Doesn't mean you can't flirt and be sexual. But she needs to be competing for your attention. Not the other way around.
Again, not easy to do. But in my opinion, that's the way to go. Some other guy may come here and say, "just bang her". Just recognize there are consequences to having to see someone all the time, "after the fact". You never know, you may end up making this chick fall hard for you. Better than you falling for her first. Challenge. Humor. Indifference. And being a classy guy at the same time.