Results 1 to 1 of 1
- 09-09-2012, 06:36 PM #1
Member
- Join Date
- Jul 2011
- Posts
- 7
- Rep Power
- 0
How many double objects on a tile
Hello,
Say I had 400 tiles (20 x 20) and 50 objects. If I put these objects RANDOMLY on the 20x20 tiles. What is the chance that I have atleast 2 objects that are placed on the same tile?
What I did was in a double for loop, I counted the amount of random generated objects. If I got an amount of 2 duplicates, I would divide this by 400 and then multiply it by 100 so I would get for example here: 0.5%.
Is this correct?
Similar Threads
-
Tile Map
By Lundager in forum Java 2DReplies: 5Last Post: 05-19-2012, 08:09 PM -
Help tile TimeScrambler game
By DrCooksAlot in forum New To JavaReplies: 8Last Post: 01-25-2012, 03:12 PM -
Simple Tile Game Question
By sgthale in forum Java AppletsReplies: 9Last Post: 06-17-2011, 11:20 AM -
Convert an objects data from int to double
By snozzla in forum New To JavaReplies: 3Last Post: 03-02-2011, 12:06 PM -
Concept of Tile map via database
By GrInd3r in forum New To JavaReplies: 0Last Post: 12-08-2010, 05:18 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks