PART FOUR
INTERACTION

ABSTRACT CLASSES

Reminder

Terrain

By making an abstract method, we can assume that all Terrain objects can possibly do something on a click or nextDay event, but we don't need to define it in the superclass.

CLICK EVENTS

In this section, our goal is to allow the user to click on cells to change terrain.  We'll first implement changes for the Dirt tile...

Dirt 

Cell

World

Game 

CHECKPOINT
Run your code and see...

NEXT DAY

In this section, our goal is to allow the user to press a key trigger a new day.  We'll start by having Dirt tiles dry out...

Dirt


Cell 

World 


Game 

CHECKPOINT
Run your code and see...