AP CSA FRQ Guide

2013 FRQ 3: GridWorldUtilities and JumpingCritter

Find empty locations in a grid and write a legacy critter that jumps to a random empty location or removes itself when none exists.

Legacy GridWorld List Processing22 minute targetGridWorldArrayList2D gridlegacy

Skills Tested

What this FRQ is really practicing

GridWorldArrayList2D gridlegacy

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. 1Part A: scan every valid grid location and collect empty ones.
  2. 2Part B: override the appropriate movement behavior to jump to a random empty location.

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

Returning null for no empty locations.
Including occupied locations in the returned list.
Overriding act when the prompt says not to.

Self Check

Review questions before you submit

Creates and returns an ArrayList of empty locations.

Return an empty list, not null, when no locations are empty.

Traverses rows and columns in the grid.

Check each valid Location.

Checks whether each location is unoccupied.

Use grid.get(location) or equivalent GridWorld logic.

Chooses a random empty location for the jump.

Do not always choose the first empty location.

Practice Links

Where to go next