So I'm trying to create 2 randomized players to a noughts and crosses game. My ideia was to randomly create a vector(1:9) of diferent matrixes(1:2)(coordinates of the board) so that the first player would play in the first coordinate,etc but i soon found that I had no ideia in how to do that. I tried to do randperm to create a vector from 1 to 9 and then do a function that mapped each number to a coordinate but as i wanted to repeat it a lot of times it would be resource and time consuming. Any ideias?
Thanks in advance
Aucun commentaire:
Enregistrer un commentaire