mario-demo
mario-demo copied to clipboard
Misleading comments
In the file Map.lua we can find the following comments :
-- 5% chance to generate a pipe
if math.random(20) == 1 then
-- 10% chance to generate bush, being sure to generate away from edge
elseif math.random(10) == 1 and x < this.mapWidth - 3 then
-- 10% chance to not generate anything, creating a gap
elseif math.random(10) ~= 1 then
Clearly, if an event occurs, the following ones can't occur. Using such statements lead to the following probabilities for the indicated events 5%, 9.5% and 8.55%. I guess this is not much of a problem but it could mislead some people wanting to add related events.