game development · propositional logic · 2024
Discrete Math Instincts
a falling-expression logic game originally built with C# and Windows Forms. read the truth values, answer true or false, and protect your three hearts. now playable in the browser with the original layout and sprites.
play in your browser
open full page ↗A browser recreation of the original C# game. Keyboard and touch controls included. Click inside the game to use its keyboard controls.
inside the project
3 captures · click an image to enlarge
why I built it
Turn truth tables into a quick reaction game: read the variable assignments, evaluate the falling expression, and answer before it reaches the bottom.
what it does
Logic under pressure
Evaluate negation, AND, OR, implication, and biconditional expressions. The closest expression is highlighted blue, with keyboard and on-screen answer controls.
Three hearts, growing difficulty
Extra lanes unlock at 8 and 20 points. A seven-answer streak restores a heart or adds a bonus point, while Advanced mode changes truth values at ten-point milestones.
The original desktop layout
The browser edition keeps the 540 × 627 Windows Forms playfield, button positions, fonts where available, and original pixel-heart artwork. High scores are saved locally.
the workflow
- 1.
Choose Normal or Advanced and press START.
- 2.
Read p, q, r, and s at the top.
- 3.
Answer the blue expression with A / D or True / False.
- 4.
Build a streak, survive new lanes, and beat your high score.
under the hood
The original is a C# .NET Framework Windows Forms application. This JavaScript recreation uses the Designer coordinates and original image assets. Its pure truth evaluator handles negation and both implication directions correctly, with separate state for scoring, timers, and replay.
scope & current state
A playable browser recreation, not an embedded Windows executable. The original answer-evaluation, repeated streak rewards, timer resets, and Advanced-mode milestone behavior were repaired. Browser font rendering and window chrome differ by device. Scores stay on this device; no account is required.