I taught myself to program BASIC on the Commodore 64 in my teens, then I programmed in the old "Max Walker's Cricket Game" board/dice game.
The original board game just featured different ratings based on form/ability for batsmen (A,B,C,D,E,F,G) and bowlers (A,B,C,D,E).
Basically you just rolled two six sided dice and checked it on the batting table under the batsman on strike's rating to see the result, and if it was an "Appeal" you rolled two dice on the bowling table to see if it was out.
I made a few changes to the original rules when I was programming. I changed the bowlers ability to be a rating out of 100 (the percentage of taking a wicket when a chance was presented), and added 3 different rates of scoring (Aggressive, Moderate, Defensive) for batsmen, and 3 different rates of run conceded for bowlers. It was all pretty simple, just lots of repetitive commands.
Run rates were excessively high (basically 1 Over in the game equaled 5 overs in a real life first class game, or 4 in a limited overs match), but it worked ok, and I could generate a first class innings in a couple of minutes (the only input required was the bowler to bowl the next over).
The original game also featured weather and pitch conditions, but my disk got corrupted before I got the chance to add that to the program, so that was the end of that.
Here is a link to a similar dice game that may be of some help for ideas or inspiration...
http://homepages.force9.net/sholing/cosmic.htm
The rules seem sound, so ignore the textual fluff and the silly Adolf Hitler pic at the top.
Different batting tactics are catered for, and it includes fielding skills, though I haven't bothered to do a quick statistical probability check to work out the accuracy of things like run rates or averages.