Oh young padawan, you have much to learn of of the female mind.
First of all, this is as good as it gets...well, it improves, but the mind games will never go away. This is a classic example of why women have a psychology class all to themselves (the Psychology of Women, yes, it's a real class, I almost took it in college

). You see, the girl tells you she just wants to be friends, then when you don't pursue but give her what she said she wants, she gets hurt. What she really wanted was for you to ask her all along. My guess is that she actually likes you and is playing that stupid hard to get game. Girls do it all the time, so get used to it.
As far as this particular girl goes and this particular dance, don't sweat it. Yeah it hurts, I understand, I've been there myself when I was in highschool; but you're young and you have many opportunities ahead of you. So learn from this. When the next girl comes along that you're interested in, take the chance and ask her out if you're feeling that mutual vibe from her. They may play the dumb games, but you'll learn how to play back.