2025Java game
MathChamp
A console game for wise mathematicians: is this sequence arithmetic, quadratic, cubic or prime? Guess right to climb ten levels.
Overview
Each round generates a random sequence. Answer correctly to level up and see the sequence's nth-term formula; answer wrong and you drop a level.
Harder sequence types unlock as you climb: quadratic at level 3, cubic at level 5 and primes at level 7. Reach level 10 to win.
See it in action
From one real game, run from the code on GitHub.
-

01 A right answer levels you up and shows the nth term. -

02 A wrong one drops you a level. -

03 Reach level 10 and it times your win.
Highlights
-
4
sequence types
Arithmetic, quadratic, cubic and prime.
-
10
levels
New types unlock at levels 3, 5 and 7.
From the source
public enum SequenceType {
ARITHMETIC("Arithmetic", 1), // an + b
QUADRATIC("Quadratic", 3), // an^2 + bn + c
CUBIC("Cubic", 5), // an^3 + bn^2 + cn + d
PRIME("Prime", 7); // sequence of prime numbers
final String typeName;
/**
* Denotes the level of the user that will trigger the appearance of the sequence
*/
final int startingLevel;