You have to separate the parameters trough a comma
public Game(int[] p1, int[] p2) {
And this isn't even close to working (note the lack of semicolons as well):
[] player1 = [] p1
[] player2 = [] p2
You want to set the instance fields equal to the given parameters, but there's no need to redefine that they're arrays.
Instead use this:
this.player1 = p1;
this.player2 = p2;
Keep in mind naming conventions: fields start with lowercase (so player1
instead of Player1
). Java is case sensitive so Player1
and player1
are not the same. Exactly one of the reasons why naming conventions exist.
Lastly: Math.random
returns a double
. If you cast it to an int
you will lose its purpose (it returns a value between 0 and 1, if you cast it to int you will lose everything between those two boundaries). Instead make it as such:
private double round = Math.random();