Sure! Here's an example of a simple billiards game implemented as a single HTML file with JavaScript:
To play the game, open the HTML file in a web browser, either on a smartphone or desktop. Use the left and right arrow keys (or the virtual arrow buttons on a smartphone) to move the paddle and hit the ball. The objective is to keep the ball from hitting the bottom of the canvas for as long as possible. If the ball hits the bottom, a "Game Over" message will appear, and the game can be restarted by reloading the page.