NDoors

This is a modified visualization of N-Doors Problem.
Problem: There are N doors in a row, numbered from 1 to N. Initially all are....

Solution: I made a 2D array representing all the doors in all the n cycles of toggles, that is, arr[0] represents the doors after the first cycle that is all open. Similary arr[n-1] represents the final state off all the doors. For all the doors i palced a brown rect on the screen and for every clased one, a black rect. After that i filtered some edge cases so that i can clearly create this Parallax effect.
The code & detailed explanation on how this visualisation is made is available here.

Controls




MOVE MOUSE TO LOOK AROUND



UP & DOWN KEYS TO MOVE


SPACE TO SHOOT