yarcat / chemistry-lines

Chemistry Lines (game)
1 stars 0 forks source link

Single oxygen must not be removed #45

Closed yarcat closed 11 years ago

yarcat commented 11 years ago

Test context

FormulaRegistryTest.testH2O

What to fix

elements("H", "2", "O").removeCompounds("H2O", "H2", "O2", "O"));

must not contain single O, it has to become

elements("H", "2", "O").removeCompounds("H2O", "H2", "O2"));
soulne4ny commented 11 years ago

It is solvable my --min-terminals=2

soulne4ny commented 11 years ago

It works for compact formulas also.

soulne4ny commented 11 years ago

TODO:

soulne4ny commented 11 years ago

The root the problem in formula mode is that SimpleReactor is designed for reaction mode.

In reaction mode it could be natural that we get a compound in a cell and then remove the compound, couldn't it? In formula mode this is irrational.