I'm doing a project for class, and I have to call the Money
function from my Player
class. However, I do not know how to change Money
into something else that is not a Method Group
. I don't know much programming, so my range of solutions is rather small.
Also, the instructor said I cannot make any changes to the Main
class, only to the Player
class.
Here's the code for the Main
class:
p1.Money += 400;
And here's the 'Money' function from my Player class:
public int Money ()
{
return money;
}