Playful Flash Exercise
I wrote this "dating simulation" during a course in Flash Algorithms. Boys and girls (this is a strictly heterosexual simulation) start off on opposite sides of a pen. When they run into each other, it counts as a "date", and they start thinking about each other. Should they run into each other again, they fall in love, and run off to live happily ever after.
Like real-life love, the simulation has its peculiarities. Sometimes a young couple has just found each other, and prepare to exit stage left, when another, single, person runs in and steals one of them! Other times, two people just don't have the spark, and will run around ignoring each other forever.
Object-oriented Actionscript 2.0 and random number generation using a Normal Distribution curve.
Download Flash source files (28Kb Zip)
Please note that some code comments are in Swedish.