Sure, here's an example of a simple online cooking game implemented as a single HTML file using JavaScript:
In this sample code, when the game starts, players are presented with a recipe consisting of pictograms representing ingredients. Players then need to type in their dish name based on the given recipe and submit it. The submitted dish names are added to a leaderboard, and the leaderboard is updated accordingly.
Please note that the code provided is a basic implementation framework, and you can extend it further with additional features like time limits, scoring, graphics, etc., according to your game's requirements.