I am making a one player Tic-Tac-Toe game against a computer and was wondering how I would be able to select a random boolean value that is false in an array where some values are true and some are false. I know to use Math.random() but I was wondering how I would be able to select a different random element if the selected element is true instead of false? Or if anybody knows a better way instead of using Math.random().
Aucun commentaire:
Enregistrer un commentaire