PART SEVEN
HARVESTING

MAKING MONEY

Game

private static int money;
  public static void gainMoney(int amount) {...}
  public static void spendMoney(int amount) {...}
  public static boolean hasMoney(int amount) {...}

Displaying Money

USING FANCY FONTS!

Fonts Class

There is a known bug with Slick that can cause visual artifacts to appear with very large size text in most fonts.  The workaround is to avoid that by generally making your titles be pre-rendered text.

Displaying Money In Style

Notice how we add +2 to the first time we draw the text in black.  This offsets it by 2 pixels, creating a shadow type effect.

CHECKPOINT
Run your code and see...

SELLING CROPS

Setting Value and Expiration

Removing Entities

Clicking

We're marking the cell as expired, but it isn't actually being removed yet!

Removing Expired Entities

CHECKPOINT
Run your code and see...

FOCUS

Resolving Ambiguity

Focus

CHECKPOINT
Run your code and see...