The game is just a RNG for each element of a basketball game: dribbling, passing, decision to shoot, shooting success, rebounding, stealing, blocking, deflecting, (unforced) turnovers such as stepping OOB. Each has a success rate affected by the talent or attributes of the offensive and defensive players (+/- adjustments on baseline success rate). Randomize the passing pattern (who throws to who), or use various "sets," or let coaches pick the set! Use parameters to determine how many passes per possession on average (fast, normal, slow) by coaches. You need about 60-ish possessions/game with a ppp of ~.9-1.2 PPP on average over 2 20 min halves. Fouling is also RNG. Set a block of code for foul shooting with parameters for +1, 1+1, 2 shots. Associate each micro-action to a randomized unit of time to tick-off the clock and players' endurance, which affects their effectiveness. Bench time replenishes endurance. Players sub out when endurance hits a specified level, or another player (starter) subs back in when his endurance is replenished. Let coaches have input on the proclivity to shoot 2's and 3's using parameters. Writing the basketball rules into the game might be the hardest part.
The bold part is key for playability. Keep the resultant numbers realistic. I've given this some thought, but this is off the top of my head. If I can help you go on your own, let me know.