Download Bowden_BL_T_2014
Transcript
Brian L. Bowden
Chapter 5. Case Studies
46
// handler within the Colony.java class for adding new ants to the World
public void onTouchDown(int x, int y)
{
Ant ant = newActorOfSelectedType();
if (ant.getFoodCost() < getFood())
{
consumeFood(ant.getFoodCost());
add(ant, x, y);
}
}
5.4.2
Greenfoot-Style Programs on Android of Familar Android
Apps
Much like the Irritated Avians case study, Ants vs. Some Bees demonstrates that Sofia.Micro
solves the two issues in much the same way. Students can easily create a version of a
popular game they would be familiar with, making Android more accessible to introductory
students. There is more variation in what students can make so Sofia.Micro continues to
remain interesting to students.