https://flikary.dev/blog/random-square-generation/