Chapter 2. The Greeps competition

We will take a little time out to go on a second interlude—a break in the chapter sequence to do something a little different. This time, we will look at “Greeps”—a programming competition.

The Greeps are alien creatures. And they’ve come to Earth! One of the important things to know about Greeps is that they like tomatoes. They have landed with their spaceship and are swarming out to find and collect tomatoes (Figure I2.1).

Two Greeps hunting for tomatoes

Figure I2.1. Two Greeps hunting for tomatoes

The challenge in this programming competition will be to program your Greeps so that they find and collect tomatoes as quickly as possible. You will ...

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.