Solved Bug in generateboard()