How can I get this guy to stop playing games with me?

This guy has been playing me like a fiddle and it has finally reached a point where I am just done. How can I show him that I am not participating anymore? Last night he ignored me for 2 hours when we were supposed to be doing a project together (he had a good excuse for leaving but then I think he actually just ditched me) he neglected to call me to tell me when he'd back or if I should just go home. So I left, ignored his phone call which I assume was an apology but he has made no further attempts. So was this right? And this is isn't the only thing, he is always super sweet and flirty and it just isn't going anywhere.