How to code heads or tails?
Posted: 05 Nov 2015, 01:40
How would one code a coin flip result for whether it's heads or tails, rather than win or lose? I looked a bit and it seems either the tail and heads themselves are assigned the number 0 or 1 or extra code would need to added to do so. So, if the game already considers each to be assigned a value of 0 or 1 then the result could be defined as that number without adding extra conditions (thereby replacing WIN or LOSE with said number), or am I totally off on this?
How would one code it so that all players flipped a coin at the same time, rather than just 1 player or less than all the players? I've seen different ways of determining that each player does something simultaneously but not in regards to flipping a coin.
I'm looking at making Goblin Assassin and those parts just really confused me.
How would one code it so that all players flipped a coin at the same time, rather than just 1 player or less than all the players? I've seen different ways of determining that each player does something simultaneously but not in regards to flipping a coin.
I'm looking at making Goblin Assassin and those parts just really confused me.