I like the idea, but you made a fairly major mistake when it comes to chemistry. You're referring to the atoms as ions, and saying that -2 ions must bond with other -2 ions. To form an ionic bond, positive ions must bond with negative ions to create a sum charge of 0. Additionally, Hydrogen atoms form h+ ions, not h- ions, and carbon does not form ions at all.
I believe that where you went wrong was that you confused ionic bonds with covalent bonds. Covalent bonds are the types of bonds that join molecules (ionic bonds typically form salts), and are based on the number of valence electrons that an atom has. Oxygen has 6 valence electrons, and 'wants' 8, so it must share two electrons with other atoms (it has two 'slots', if you will). Hydrogen has 1 valence electron and 'wants' 2, so it must share 1 electron with another atom (1 'slot'). Carbon has 4 and 'wants' 8 (4 'slots')
So the gameplay itself is largely physically sound, and the math works out, you just need to fix your terminology a bit.