State machines
A big kill should lift a unit by several ranks, not one
Experience systems are often written as one step at a time. Then a huge reward leaves a unit one level short, with leftover points that count for nothing until the next fight. This entry shows how to hand out ranks so the result never depends on how the points arrived.
Two players take each other's capital in the same turn: who wins?
If the game ends the moment one capital falls, whoever moves first wins every tie, and the other player never gets to play the turn they were promised. This entry shows when to look for a winner, what a draw is, and how teams change the answer.
A vote to remove a troublemaker never ends or ends too early
Players leave while the vote is open, the accused also gets a say, and a tie leaves everyone staring at a stuck message. This entry shows how to count fairly, when a vote can already be called, and what happens at the deadline.
A cart arrives at full warehouses: accept part, keep the rest on the cart
A full store is rarely all or nothing. A delivery may fit in part, spread over two stores or not fit at all, and the rest has to be somewhere. This entry shows the order of filling and what to do when a store has more in it than its new size allows.
Enemy waves that come in groups, wait for the field to clear and can be called early
Wave-based defence needs a small conductor: a countdown, a spawn that does not flood one frame, a check that the wave is really over and a reward for impatience. The reward is where it goes wrong, because it can be claimed twice or at the wrong time.
A worker keeps walking to a building that no longer exists
Fields get cut, mines run dry and houses burn while a worker is on the way there. If the job is stored only as a pointer, the worker stands at an empty spot or crashes the game. This entry shows how to check a job and where the worker should turn next.
A workshop that stops should say whether it lacks supplies or has no room
Production buildings stop for two opposite reasons, and players need to know which one, or they fix the wrong thing. There is also a quiet bug where a blocked workshop eats its supplies again and again. Here is how to tell both stops apart.