Sure! Here is a simplified version of the game you described, implemented as a single HTML file containing JavaScript enclosed in script tags:
To play the game, copy the above code into an HTML file and open it in a web browser (preferably on a smartphone). Use the arrow keys to move the blue circle and try to eat all the black circles without touching the red circles. The green circles have some random movement. If you eat all the circles, you win; if you touch a red circle, you lose.
Have fun playing!