Above is first play I'm attempting to model, a simple high pick and roll with the 1 and 5 man. The first thing I did was map out the play sequence, as well as the different options that it can branch into. Each step of the play has calculations that determine the next step, as well as situations like turnover & foul opportunities.
The halfcourt is broken down into 14 logical slices - the standard sections you see on a shot chart - and the sim keeps track of player's positions on the floor each step on offense. It may seem like overkill for a text sim, but I think it will prove handy later, and opens up the possibilities of including things like shot charts, play diagrams etc. down the track........... much, much later down the track.
On defense I'm currently plotting out the play assuming man defense, but I have a good idea how zone will work, with defenders being responsible for an area of the court (using the same slices as above). I've also made it easy to assign defenders to specific players rather than matched with the same position for when I get to working on strategy.
For the actual play, despite being pretty simple, there are still a total of 6 scoring possibilities from the play itself - a 3pt/long 2 from the PG off the screen, a drive from the PG off the screen, a corner three from the 2, a baseline jumpshot for the 4, the rolling 5 cutting to the basket, and finally the 4 man cutting to the FT line for a possible jumpshot.
There are also multiple opportunities for fouls, turnovers, and "broken play" situations.
Right now I have each step of the play coded and running with (very) simple commentary being generated, more just to show me that it's flowing correctly. About half the choices being made are still purely random. My goal this weekend is to have every choice generated from attributes, and hopefully be able to switch out the man defense for a 2-3 zone.
My goal is to have this one play working completely - ie. complete strategy implemented for both offense and defense. Once I'm happy that the play works entirely as I'd like, I'll feel fairly safe moving on without the fear of needing a massive re-write of everything down the track...