Greenfoot

Beschreibung

GCSE Computer Science (7. Programming) Karteikarten am Greenfoot, erstellt von Zoe CB am 01/04/2016.
Zoe CB
Karteikarten von Zoe CB, aktualisiert more than 1 year ago
Zoe CB
Erstellt von Zoe CB vor mehr als 8 Jahre
44
0

Zusammenfassung der Ressource

Frage Antworten
Moving according to arrow keys if(Greenfoot.isKeyDown("up")){ setLocation(getX(), getY()-1); } if(Greenfoot.isKeyDown("right")){ setLocation(getX()+1, getY()); }
Moving around randomly if(Greenfoot.getRandomNumber(100)<20){ move(2); } if(Greenfoot.getRandomNumber(100)<20){ turn(-90); move(-2); }
"Eating" Actor Zoe = getOneObjectAtOffset(0,0, Food.class); if(isTouching(Food.class)){ HouseWorld houseWorld houseWorld = (HouseWorld)getWorld(); removeTouching(Food.class); }
Playing a sound Greenfoot.playSound("pop.wav");
Counter (at the end of the code for "eating", still in the if statement)
Counter (in the code for the world)
Zusammenfassung anzeigen Zusammenfassung ausblenden

ähnlicher Inhalt

Computing Hardware - CPU and Memory
ollietablet123
SFDC App Builder 2
Parker Webb-Mitchell
Intake7 BIM L1
Stanley Chia
Data Types
Jacob Sedore
Software Processes
Nurul Aiman Abdu
Design Patterns
Erica Solum
CCNA Answers – CCNA Exam
Abdul Demir
Abstraction
Shannon Anderson-Rush
Spyware
Sam2
HTTPS explained with Carrier Pigeons
Shannon Anderson-Rush
Data Analytics
anelvr