c++ game code

unfactored