To let the computer play against you is realy not easy.
To implement turns is. You just need to use a variable which says which turn it is at the moment but the arctivical intelligence that your programm needs is realy not easy.
For an example you could take a look at my Cardgames scenario. I used variables for turns there. And also an arcitifical intelligence playing against you.
You should first take a look at the code of Black Jack because that's the easyest one.
The whole code of the AI is in the world classes.
I hope that will help you.