Monday 5 October 2015

Heads or Tails

We used flash and some basic coding to create a heads or tails-like game, using code such as math.random I could set it so any number between 0 and 1 would be randomly selected, if it was lower than 0.5 flash would send a message saying "you landed on heads", if the number was greater than 0.5 it would say "you landed on tails".



We then had to introduce a point and streak system that required two buttons, (one saying heads, and the other tails) each button flipped the coin, however it would give you a point if the outcome matched the button.



The player had to guess correct three times in a row to win, if they picked heads and the outcome was tails, then any streak they had was reset and they had to start again.

Although i'm finding flash coding difficult, in a few weeks i'll have enough experience and will succeed.

No comments:

Post a Comment