Quert Alfonso M. Villafuerte
← all projects

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.

c#.net frameworkwindows formsjavascripthtmlcss

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

Three expression lanes unlocked, with truth assignments, blue target, streak meter, and original heart sprites.
Start screen with Normal and Advanced modes in the original Windows Forms layout.
Game-over panel with the locally saved high score and replay controls.

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

01

Logic under pressure

Evaluate negation, AND, OR, implication, and biconditional expressions. The closest expression is highlighted blue, with keyboard and on-screen answer controls.

02

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.

03

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. 1.

    Choose Normal or Advanced and press START.

  2. 2.

    Read p, q, r, and s at the top.

  3. 3.

    Answer the blue expression with A / D or True / False.

  4. 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.