The RCWeb Tetris App (app/tetris) is a competitive two-player arcade puzzle game leveraging the Asymmetric Pattern. It renders two independent drop-matrices on a single viewer screen while remote clients connect to act as dedicated gamepads.


<canvas> elements.The core script.js manages state through a structured object approach rather than a global singleton, allowing it to easily manage multiple independent arenas.
stateTemplate factory function instantiates isolated playerState objects containing the matrix array, position pos, score, and drop counters for each player.collide function iterates the active matrix grid against the settled arena grid mathematically, ensuring blocks stop correctly and restricting illegal rotations from intersecting existing geometry.rc.send() (e.g., controls.setScore(0) or controls.setTheme('default')) to keep the gamepad's LCD-style readouts perfectly synced.