Green foot

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/15

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

16 Terms

1
New cards

Move via arrow key

If (Greenfoot.isKeyDown(“ ”)) {

setLocation( getX(), getY());

}

2
New cards

Turn when at edge

If (isAtEdge()) {

Turn(180);

Move(10);

}

3
New cards

Make an object move randomly

move(Greenfoot.getRandomNumber(10));

turn(Greenfoot.getRandomNumber(180) -90);

4
New cards

Eat

If (isTouching(car.class)) {

getWorld().removeObject(this);

}

5
New cards

Play sound

Greenfoot.playSound(“pop.wav”)

6
New cards

Stop

Greenfoot.stop();

7
New cards

Counter

Counter counter = (Counter)getWorld().getObjects(Counter.class) .get(0);

counter.add(1);

8
New cards

Sensible size for a word

(100, 100, 4)

9
New cards

What is an assignment

Giving something a value

10
New cards

What is a selection

if statement

11
New cards

Example of a superclass

  • World

  • Actor

12
New cards

Example of an inherited class.

World —> ground

13
New cards

What is a parameter

It is anything inside the bracket

14
New cards

What is method

Public void act

15
New cards

Example of a private property

counter (LOWER case ONLY)

16
New cards

Examplm of a parameter

Amount