I’m making good progress making my own graphics library that will display the user interface. I can show multiple cards and move them. I feel like I am just creating what has been done hundreds of times since videogames were invented, but that’s ok. But that is the problem is writing your own code or “rolling your own.”
I’m still using Java of course. And I am just writing a little bit of code on top of the existing Java interface. The part of Java that creates user interfaces is called “Swing”, I don’t know why they named it that. So all I have to do is to generate the card picture and let Swing do all of the hard work of actually drawing it on the screen.
Each card is considered to be a sprite and when you click on a card, you are moving a sprite. All of the sprites are held in a “Sprite List” which is similar to an array. When the user click on a card, the xy coordinates are given to the sprite list and if a card is in that area, the user will be able to move that card. Everything is all pretty simple and straightforward so far.
For the mana pool on the left side of the screen, I may cheat and try to let Swing do all the work. It has a label class that can show a picture and some text, which would let me easily create the mana pool.