Greenfoot Counter Flashcards

1
Q

How do you add counter to world?

A
theCounter = new Counter();
addObject(theCounter, x, y);
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do you create reference to counter?

A

private Counter theCounter;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do you create the method getCounter?

A

public Counter getCounter()
{
return theCounter;
}

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How do you do counter tingy in object tingy?

A

Space world = (Space) getWorld();
Counter counter = world.getCounter();
counter.add(1);

How well did you know this?
1
Not at all
2
3
4
5
Perfectly