CPU vs. CPU/Simulation ..Help

For my final year project, i’m creating an online basketball league. I know how to deal with interfaces and displaying stats and information(using xml). I’m coding this in flash, actionscript which i will incorporate into a website. Now this is what i dont know how to do… i want to simulate a game of basketball on court and have me press buttons that manipulate what happens on court… i don’t know where to start… I’m going to call the website OBA online basketball association with a draft system, basically the player assumes the role of the coach and can manipulate what happens to the players on the court(drive to the hole, pull up, pass) these will be done by instant action buttons, easy enough. Off court you can trade players and design strategies for your preferred simulation but i don’t know where to start with simulation apart from animations. All calculations between objects and stats(xml) are easy to do but need help on this. I think i can do this BIG but need some tips