Divisor Defense Game

Enemies walk a winding road toward your castle, each carrying a number. You build towers labelled with primes, and a tower only fires at a number it divides. Each hit divides the number by the tower's prime, so 21 hit by a 3 tower becomes 7, and an enemy pops when it reaches 1. Primes walk straight past any tower that cannot divide them, so you read each wave before it comes and build for the factors in it.

Numbers march on your castle. Build prime towers that divide them down to 1, and read each wave for the factors it brings.

How to play

  1. Before each wave, its numbers are listed along the top of the board. Work out which primes they need: 12 is 2 × 2 × 3, so it needs a 2 tower and a 3 tower.
  2. Pick a tower in the build bar under the board, then tap the grass beside the road to build it. The towers are 2, 3, 5, 7, 11 and 13, and each costs ten times its number, so a 2 costs 20 gold and a 13 costs 130.
  3. A tower fires at any enemy in its reach whose number it divides. Each hit divides the number by the tower's prime, and the enemy pops when it reaches 1. A tower between two runs of the road reaches both, and one on a bend reaches three.
  4. A number that no tower on its way can divide walks on. Each enemy that reaches the castle costs one of your 20 lives, and the game is over when the last one is gone.
  5. Wave 1 starts by itself after 30 seconds, and each wave after it 20 seconds after the last one is cleared. Press SEND WAVE to start it sooner, for one gold for each second left on the clock.
  6. Pick SELL and tap a tower to take it down. It pays back all it cost between waves, and half during one.

The first waves bring in one prime at a time: 2 and 3, then 5, then 7, then 11 and finally 13, which comes alone at first, so you need its own tower. After wave 8 every wave is made up from all six primes, with more numbers, more factors in each and a quicker march every time.

On a keyboard, type 2, 3, 5 or 7 to pick a tower, and 1 followed by 1 or 3 for an 11 or a 13. Move the lit tile with the arrow keys and press Enter to build there. S picks SELL, N sends the next wave, and Escape or Space pauses.

Scoring

Your five best scores are saved in this browser, with the wave each game reached. In practice, no life is lost and a number that gets through is shown with its prime factors, so the game goes on until you end it from the pause screen. Practice games are not saved.

Prime factors and divisibility

Every whole number above 1 is a product of primes in exactly one way, so a number's prime factors tell you everything that divides it. Divisor Defense makes that the whole game: a 60 needs two hits from a 2 tower, one from a 3 and one from a 5, in any order, and nothing else can touch it. Reading a wave quickly means spotting the factors at a glance, by the last digit for 2 and 5 and by the digit sum for 3.

For a faster drill on the same skill, play Prime Factor Cannon, where you factor each number as it falls, or look a number up in the list of prime numbers. Fast arithmetic like this is the ground work for mental math.

Try our other free memory games, such as Root Sniper for square roots or Cashier Rush for making change.