I think Random.intPos can be 0
Replaced A=>B* with (A=>B)* as a workaround for IntelliJ parsing bug.
Added constructor on Shape companion