James Kilgarriff wrote:My problem is assigning the AI player at random. At the
Generally if you need to randomly (as if by statistical chance) do something in any program the approach is to use the Random class.
It is worth reading the javadoc.
The parameter to Random.nextInt defines the EXCLUSIVE value for the upper bounds on the int which is returned. The lower bounds are always zero and INCLUSIVE.
This will generate a random value and then you will write a switch or if-then-else that creates one or the other class, depending on the value returned.