build functionality to generate random board. working version