Generate board function (not completed)