More idiomatic Scala in richards.
while instead of for-range -> Scala.js faster than JS!