title: Cricket match algorithm
body: <p>I need to create a cricket manger game (much like football manger). </p>
  
  <p>Long story short i need to decide the outcome of a game based on each users team and tactics. My idea was to decide the outcome ball by ball.</p>
  
  <p>So depending on a Bowlers attributes (strength, stamina, skill etc) a ball (with some properties : speed etc) is send towards the batsmen, the batsmen would hit (or not) the ball depending on a score too, if the ball is hit i would then send the ball towards one of the fielders (assume there are 9, generate a random number between 1 and 9 and pass the that fielder). Again based on fielder skill it would catch the ball or not.</p>
  
  <p>What I'm missing is the number of runs the the batsmen would do before the ball is catched.
  I want to fine tune the direction of the ball.
  I'm also not sure how order of player entrance would affect the game outcome.</p>
  
  <p>Can you help me define a good match workflow ? ( I'm not very familiar with a cricket, read tutorials, watched games, never played though). </p>
  
  <p>Thank you.</p>
  
  <p>Update:</p>
  
  <p>I'm also thinking to that a ball would store most of the decision data need, e.g:</p>
  
  <p>ball.<strong>Bowler</strong> = player (the bowler who threw the ball)</p>
  
  <p>ball.<strong>Batsmen</strong> = player (the batsmen who might hit it)</p>
  
  <p>ball.<strong>OverId</strong> = in which over this ball was played</p>
  
  <p>ball.<strong>Hittable</strong> = 4 (the number would be probably generated from the bowler strengt + others, also it might be dependent on Bowler and Batsmen</p>
  
  <p>ball.<strong>Runs</strong> = 2 the number the runs made by the batsmen who hit the ball</p>
  
  <p>ball.IsUsed whenever the ball is worn out or new
  ball.IsOutside = true if the ball was send outside the field</p>
  
  <p>===== Would be used to calculate if the batsmen can bat this ball or not</p>
  
  <p>ball.<strong>ThrowHeight</strong></p>
  
  <p>ball.<strong>ThrowSpeed</strong></p>
  
  <p>ball.<strong>ThrowEffect</strong></p>
  
  <p>ball.<strong>ThrowNumberOfBounces</strong></p>
  
  <p>ball.<strong>BattedHeight</strong></p>
  
  <p>ball.<strong>BattedSpeed</strong></p>
  
  <p>ball.<strong>FieldlerDirection</strong> = <strong>3</strong> (towards  the third fieldler), random</p>
  
  <p>ball.<strong>FieldlerDirectionOffset</strong> = <strong>2</strong> (in the 2 meter range of the 3rd fieldler. 0 would be that the fielder might catch it directly from mid air, ), random</p>
  
  <p>And i also need to consider if the bowler shoots for the stumps, this would be another workflow..</p>
  
  <p><strong>Update2:</strong></p>
  
  <p>The competition is 20/20 cricket.</p>