There are 538 electoral votes: one for each of the 435 members of the House, one for each of the 100 Senators, and 3 for the District of Columbia under the 23rd Amendment. A candidate needs a majority — 270 — to win the presidency.
In 48 states it is winner-take-all: whoever gets the most votes in the state wins all of its electors, by one vote or by twenty points. Only Maine and Nebraska split their electors by congressional district.
Because the office is won state by state, a candidate can win the national popular vote and still lose the presidency. It has happened five times — 1824, 1876, 1888, 2000, and 2016. Where your votes are matters as much as how many you have.
One state usually decides it: the tipping-point state that carries the winner past the 270th elector. In 2000 that state was Florida — settled by 537 votes out of six million. And every vote piled up beyond fifty percent in a state you already lead is wasted: it buys no extra electors, which is why campaigns pour everything into a handful of close states.
Something in the simulation stopped unexpectedly — the lesson continues without it. Nothing you did was wrong; you can move on.