File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Game Development and the fly likes how to write logic for simulation a cricket match Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Game Development
Bookmark "how to write logic for simulation a cricket match" Watch "how to write logic for simulation a cricket match" New topic
Author

how to write logic for simulation a cricket match

shivang sarawagi
Ranch Hand

Joined: Jun 19, 2008
Posts: 147
I want to develop cricket game which will simulate a match ball by ball depending on player stats (bowler's skill/experience, batsman's skill/exp, fielding/wicketkeeping stats, so on...) and other related variables. Plus user can provide inputs during the match & the result should alter according to the user inputs. The match is purely text based no graphics. I am to develop this in java.

For this I am not sure what do I need to learn to write this kind of logic. I read somewhere that Finite State Machine or AI might come in handy. I just need a little guidance. Can anyone help Thanks
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11309
    
  16

as always..

1) turn off your computer
2) get some paper, pencils, and erasers
3) draw pictures. sketch things out. figure out how YOU would do it if all you had were the above tools (and possible some dice to generate random numbers).

When you can do the above, and explain it to a ten year old child, THEN start thinking about how to do it in java.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to write logic for simulation a cricket match