code-dot-org/dashboard — pull request #890 by Bjvanminnen (2014-06-25 23:20:16+00:00)
Title: Some additions to specifying a bee level

We had a long discussion about bee this morning that led to some simplification/changes. I'll have a big PR on the blockly side tomorrow and won't be committing this until then, but wanted to get some code review on this earlier since I'm not as familiar with this side of the code.

The main change is that I needed a way to have flowers of different colors in the same level. The approach I've taken is that we specify a default flower type (now restricted to red or purple). You then have the ability to override the flower type using the form +4R (red flower with 4 nectar), +2P (purple flower with 2 nectar), -2FC (a hive with a capacity of 2 that will initially show us as a flowercomb, i.e. can't tell if it's a flower or honeycomb).

The logic for parsing/unparsing is starting to get a little complicated, but I think the way I've structured it is reasonably clear.