I have coded a simple video game in Java. It works fine on all computers that have Java installed. However, I would really like to play it on my smartphone and it would also be nice to be able to play it on pretty much any smartphone no matter what model/company/OpSys etc. Here is my question:
How can I convert my Java video game into something that runs on mobile devices (a smartphone), ideally without completely rewriting the whole source code?
After all, the idea of Java is that you write the code once and then it runs on pretty much all devices. I would not mind copy-pasting my own source code and maybe add/change a few lines of code. But I would really like to avoid having to rewrite it in some completely different language.
Details about my game: It is a simple one-player vs CPU 2D card game, where you click on a few buttons and pictures. Every now and then there is a dialog window. That's pretty much all. But there are many pages of AI / game logic source code.
On the computers the input for this game is just left-clicking on the buttons. Ideally, on a device with a touch screen, one would just touch the buttons depicted on the screen. I have not really looked into porting myself that much. My hope was that in this modern day and age, where smartphones are pretty much computers, there would be something as close to a one-click-converter as possible. Again, the original idea was that with Java you are supposed to write one source code for all devices.