Sure! Here's a basic implementation of the game as a single HTML file with JavaScript:
To play the game, you can copy the code above and save it as an HTML file. Open the file in a web browser, and you should see the game running. Use the arrow keys on your keyboard to control the blue cube and try to eat all the black cubes while avoiding the red cubes.