That constructor allows you to give an individual name to each Pawn.
Type: Posts; User: Norm
That constructor allows you to give an individual name to each Pawn.
When would a Pawn not be a "PAWN"? That String could be in the constructor, not passed. The code would allow:
pawn1White = new Pawn("WHITE", "Trooper" , 6 , 0 , this );
Question: Why pass "PAWN" to a Pawn class object? When would a Pawn not be a "PAWN"?
Yes, the reference would be to the current version.
Pass a reference to an instance of class A to class B to allow class B to access class A's variables and methods.