From: Stefan F. <ste...@we...> - 2011-10-14 05:13:44
|
All: Another milestone is reached: A commit without compile errors was pushed to the Rails 2.0 branch. But do expect it to run, that is the next milestone ;-) And most of the redesign of the Model/State concepts is done, but there is a lot of follow-up todos and fixes necessary. As the old type of moves mainly effected the ownership of Rails elements (like a company owns shares, trains, etc.) I was forced (or had the opportunity) to have a closer look onto this area of code and decided to change that to some extent too. The good thing is that if everything is cleaned up in the end, the change of ownership only requires the issue of object.moveTo(newOwner) and everything else is hidden behind the scenes: Setting the new owner inside the owner, adding the object to the portfolio and/or holder variable of the new owner and removing from the portfolio of the previous owner. Even if this seems like magic, I focused to keep the code simple and to use some generics, but not too much of it, avoiding recursive or multiple usage of it, which can be quite confusing in Java. I will soon upload the Javadocs of Rails 2.0 to sourceforge. If anyone is interested to have a look now, the interesting changes are all in rails.game.model and rails.game.state. I hope to get the opportunity soon to write some more about that all, but there is always the trade off between writing code and writing about code. Anyway this should indicate that there is some serious development going forward here and one should keep in mind that it gets more and more difficult for me to merge changes in Rails 1.x to Rails 2.0 branch. So please avoid major refactoring inside Rails 1.x or be aware that I might not be able to merge it into Rails2.0. Stefan |