AP CSA FRQ Guide

2011 FRQ 2: AttractiveCritter

Write a legacy critter that attempts to move other actors one cell closer before moving like a normal critter.

Legacy GridWorld Actor Movement22 minute targetGridWorldobjectsmovementlegacy

Skills Tested

What this FRQ is really practicing

GridWorldobjectsmovementlegacy

Treat these skills as the study checklist. If any tag feels shaky, review that topic before attempting the full written response.

Starter Approach

How to begin without copying a solution

  1. 1Override the appropriate Critter processing method, not act.
  2. 2For each other actor, compute a location one step closer.
  3. 3Move an actor only if the destination is empty.

Write a first attempt before revealing any solution outline. Most AP CSA FRQ progress comes from tracing your own code and finding the missing case.

Common Mistakes

Mistakes to watch for while writing

Overriding act and breaking Critter postconditions.
Moving actors into occupied cells.
Moving the attractive critter instead of the other actors during processing.

Self Check

Review questions before you submit

Declares AttractiveCritter as a Critter.

This is a legacy GridWorld archive prompt.

Overrides actor-processing behavior.

The prompt explicitly says not to override act.

Computes direction toward this critter.

Use the GridWorld direction helper named in the prompt.

Moves another actor only to an empty valid location.

Occupied destinations should leave the actor where it is.

Practice Links

Where to go next