Pro tip: I assume your bug with the generation is caused by having an integer and a float where the 0.1 is the float and when you add 0.1 to an integer, it just discards that because integers are whole numbers. I would usually have the number be a float, or if it must be an integer i'd make a new variable to carry over the sub-integer values. This carry technique is very common and used in every single computing chip nowadays too. The idea is simple, check if your carry float is 1 or greater, then separate the whole number and add it to the integer while keeping only the remaining non-whole number. This can be done with a modulo of 1.