add documentation comments to game-end.js