# Random generation of a board

So I have four "boards" made of 16 sprites (4x4). Each board is parented to an empty GameObject. I would like to randomly generate their positions but I am not sure how. However, they should still be generated at the middle of the screen not like anywhere off. So basically each board can be placed at any position but must touch at least one of the boards. The sprite of one board should line up with the sprite of the other board. For example:

So yeah any help is appreciated!

You can use a Dictionary<string, boolean> to keep track of which spaces are taken by taking the integer coords and concatenating then together with a comma (or whatever separator), and storing true in the dictionary for all the taken spaces.