I coded this function using C++ to mess around with, the game crashes at the end.
Website source code: GitHub