Programming is modeling
pooladkhay.com·76w
Preview
Report Post

Jul 11, 2024

A short description of why mental models are important when building systems.

Intro

A CLI game is basically a state-machine with a loop that continuously checks and updates the state based on some criteria such as user input or when a collision happens.

A while ago I built such a game, HEXvaders, where, not surprisingly, I had to dynamically print characters to the terminal screen. Later I decided to let multiple players compete online by splitting the screen such that the game occupies two-thirds of the screen, with the remaining one-third dedicated to a scoreboard.

Soon I realized that in order to split the screen to add a scoreboard, I need to refactor the entire codebase, and if you need to refactor an entire idea to…

Similar Posts

Loading similar posts...