/** The Player, Edges and Rocks each have a [Clan]. Each Clan has its own colour. The player will die it he touches a rock from a different clan. Rocks will pass though walls iff they are of the opposite clan, otherwise they will bounce. */ enum class Clan( val color : Color ) { EENY( Color.create("#e5e62c") ), // Yellow MEENY( Color.create("#9b27b8") ), // Purple MINY( Color.create("#e6a12c") ), // Orange MO( Color.create("#2c94e6") ) // Blue fun opposite() : Clan { if (this === MEENY) return MINY // Purple and Orange are opposites if (this === MINY ) return MEENY if (this === EENY) return MO // Yellow and Blue are opposites return EENY } }