0

I am trying to understand how to use rand to do this. if there were two players for example player a and player b and the computer had to be one and the human the other. How would i implement this?

1 Answers1

-2

[:computer, :player].shuffle.first will give you on random who is first.

hahcho
  • 1,369
  • 9
  • 17