Ok, so what do you mean by "randomly generating the figures positions"? Do you mean that you want them in random places? If so, have a look at how you draw your lines. Imagine your Xs and Os as...