Rename all game sources to .cpp.
Refactor beacons' game and shared code.