I need to add some sort of score at the top, but I'm not sure how.
I've tried playing around with some of functions and moving around score functions but I'm coming up without a proper score counter.
Here's the User players class:
Score myInt = new Score();
myInt.score();
if(Pig != null)
{
World farm;
farm = getWorld();
farm.removeObject(Pig);
}
if(Sheep != null)
{
World farm;
farm = getWorld();
farm.removeObject(Sheep);
}
if(Bonus != null)
{
World farm;
farm = getWorld();
farm.removeObject(Bonus);
}
Here is the score method in the Score class:
public void score()
{
int score = 0;
}
I don't have the scores up yet, but I'm looking to have the Pig be 1 point, the Sheep to be 3, and the Bonus to be 10, and as you play along and move the player, as you eat the objects, you should get the corresponding points. The points should go into the int score object, but the score won't show up in the first code.