You tap the left half of the screen to move the bar to the left.
You tap the right half of the screen to move the bar to the right.
The ball's direction is determined by the position of the bar.
This is the sauce code!
https://onedayoneappli.hatenablog.com/entry/2019/12/05/045356
簡単なテニスゲームです。