Chapter 2. The first program: Little Crab
topics: | writing code: movement, turning, reacting to the screen edges |
concepts: | source code, method call, parameter, sequence, if-statement |
In the previous chapter, we discussed how to use existing Greenfoot scenarios: We have created objects, invoked methods, and played a game.
Now, we shall start to make our own game.
The Little Crab scenario
The scenario we use for this chapter is called little-crab. You will find this scenario in the book projects for this book.
The scenario you see should look similar to Figure 2.1.???
Figure 2.1. The Little Crab scenario
Example .
Exercise 2.1. Start Greenfoot and open the ...
Get Introduction to Programming with Greenfoot: Object–Oriented Programming in Java™ with Games and Simulations, First Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.