Every ten years, after the census, states redraw the boundaries of their voting districts. Whoever controls the pen can gerrymander — draw the lines to decide the winners before a single vote is cast.
Two moves do the work. Packing crams the other party into a few districts they win 90-to-10, so their extra votes are wasted. Cracking splits them thin across many districts so they fall just short in each. Same voters, opposite result.
The efficiency gap counts the votes each side "wastes" — cast for a loser, or piled up past the margin needed to win. A fair map wastes votes about equally; near zero is fair. Polsby–Popper compactness (4π·area / perimeter²) scores how blobby a district is — a snaking gerrymander scores low.
Here the two parties are drawn as warm and cool so no real party is implied. Warm holds just 45% of the vote — yet you can hand it a majority of the seats. That's the whole trick, and courts still argue over where the line is.
Something in the simulation stopped unexpectedly — the lesson continues without it. Nothing you did was wrong; you can move on.