Hi everyone, This is my first time posting on Java Ranch Forum.
Here is my problem that I would request for help with. I have created a card matching game using a JPanel as the display are for the game. The game seems to work fine. I still need to solve an issue with the processor, the processor is running at 70% for my simple program. the RAM memory is 25MB. that is quite big compare to Windows solitaire 5MB. I am wondering if my code can be optimize further (reduce size and processor usage.). anyone have any suggestion?
Here are the codes and screenshot attachment of the of my game. My apology if the post is too long.
1. Viewport - to be extended by the main game display
2. BaseFrame - JFrame that will hold the Viewport.
3. MatchDisplay - the actual Display
5.Desk - Place where I put the card
6. Card - finally the last class the card it self.
1. You may not implement all *Listeners in the ViewPort class
2. You may create separate *Listener classes and instantiate them to use within the MatchDisplay class
3. You may merge Deck and Desk classes
4. You may eliminate BaseFrame class and do the needful within the MatchDisplay class
Not many get the right opportunity !
Talk sense to a fool and he calls you foolish. -Euripides A foolish tiny ad:
ScroogeXHTML - small and flexible RTF to HTML converter library