I’ve been playing with the RubiksCube.java found in the forum for some time now.
My concern now is to use the jME code only for display, that is in a MVC fashion being only the View part.
Basically i want to have :
Main.java to instanciate controller Core.java
Core.java to instanciate DataModel and View (jME)
Main to start controller
Actually i want my Controller and DataModel to be able to work w/o any display, thus separating the jME logic. jME should only respond to messages like "rotate this like that".
Input controls are on a separate JPanel interacting with the controller.
Any clue how to separate all that and make it quite modular?
I think in terms of composition rather than agregate, the composite will be a GUI type object that is specific for a JME graphics front end. The composition has normal data objects ( such as cube ) and it has reference to the node which holds the cube.
When the user selects to rotate ( by button or dragging on the cube ), the normal data objects are updated and then and action or whatever you decide updates the graphics.
this is my approach anyhow. Think hevee has seperated his content in a similar way…