Switch to pure functions for random board gen.