From: Erik V. <eri...@hc...> - 2007-12-21 23:32:12
|
I have implemented the 18AL named trains (a special ability of the M&C private). As usual, this addition of a new special ability has caused some significant side effects. 1. As I believe this ability is unique (or almost unique) to 18AL, I have taken the opportunity to make this the first game-specific extension that is not integrated in the generic code, but in game-specific subclasses. I have put these new subclasses in two new game-specific packages: rails.game.specific._18AL and rails.ui.swing.gamespecific._18AL. Looking back, I think the 1830 M&H/NYC swap is unique to that game, so it might be an idea to take it out of the generic code. I'll gladly leave that as an exercise for someone else. 2. Another new aspect is that the train naming ability does not disappear when the private closes. So I had to implement a new way to make it permanent by moving the special ability object from the private to the company portfolio. 3. Initially I had created a new Move subclass to move the ability object, but it occurred to me that undoable object moves are in fact pretty generic. The new class ObjectMove now handles both token and ability object moves. Perhaps other objects moves can be merged into this class as well. Two new interfaces Moveable and MoveableHolderI support this now generic mechanism. While testing this all, I also found and fixed two bugs in the public company flotation code. BTW I think the term (and class name) SpecialProperty should perhaps be replaced by SpecialAbility, as I find the latter a lot more descriptive. Erik Vos |
From: Brett L. <wak...@gm...> - 2007-12-21 23:43:47
|
On Sat, 2007-12-22 at 00:32 +0100, Erik Vos wrote: > I have implemented the 18AL named trains (a special ability of the M&C > private). > Excellent! With the holidays, I've had no time to do any coding. :( > I have put these new subclasses in two new game-specific packages: > rails.game.specific._18AL and rails.ui.swing.gamespecific._18AL. > That looks fine to me. "Game" is starting to look awfully out of place in our namespace. Perhaps sometime in the future we should consider refactoring that a little. Also, I'm getting rather tired of dealing with CVS's bone-headed design. I know Sourceforge has other RCSes available (e.g. subversion). I should probably investigate if migrating to a modern RCS would make our lives a little easier. > Looking back, I think the 1830 M&H/NYC swap is unique to that game, > so it might be an idea to take it out of the generic code. > I'll gladly leave that as an exercise for someone else. > That's fine. It's another good project for any potential new developers looking for a small-ish task to gain familiarity with our code. > BTW I think the term (and class name) SpecialProperty should perhaps be > replaced > by SpecialAbility, as I find the latter a lot more descriptive. That sounds fine by me. Java has other things it calls "properties" so, I find that it's a little misleading to me as well. ---Brett. Some of the things that live the longest in peoples' memories never really happened. |
From: Erik V. <eri...@hc...> - 2008-01-01 15:00:48
|
For a start: Happy New Year to you all! > "Game" is starting to look awfully > out of place > in our namespace. Perhaps sometime in the future we should consider > refactoring that a little. I have thought about that too. Perhaps we could move the "static" objects (like trains, certificates, tokens, phases, maphex etc.) to a subpackage, e.g. rails.game.objects. And the Rounds to e.g. rails.game.rounds, leaving a mixed bag of managers, Portfolio, exceptions etc. in the current package. > Also, I'm getting rather tired of dealing with CVS's > bone-headed design. > I know Sourceforge has other RCSes available (e.g. > subversion). I should > probably investigate if migrating to a modern RCS would make > our lives a > little easier. I am not familiar with the differences. So far CVS looks good enough to me, but I'm probably unaware of what goodies we are missing. For SVN we would need an Eclipse plugin, Subclipse seems to be the way to go. Erik. |
From: John A. T. <ja...@ja...> - 2008-01-01 16:28:44
|
Erik Vos wrote: > I am not familiar with the differences. > So far CVS looks good enough to me, but I'm > probably unaware of what goodies we are missing. > > For SVN we would need an Eclipse plugin, Subclipse seems to be the way to > go. > Subclipse is not bad, but it doesn't like it when you do anything with the repository behind its back. I use Eclipse + svn at work all the time, and simply don't use subclipse and do svn ops at the command line. The only time it is a problem is when you do a refactor that moves files, and there I just do the Eclipse refactor, mv the file back, then svn mv it to where Eclipse moved it. The big differences between cvs and svn are that svn commits groups of changes atomically, change (release, etc) branches are easy to do, and it tracks moves/renames with history. -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |
From: brett l. <wak...@gm...> - 2008-01-01 21:40:06
|
On Jan 1, 2008 8:28 AM, John A. Tamplin <ja...@ja...> wrote: > The big differences between cvs and svn are that svn commits groups of > changes atomically, change (release, etc) branches are easy to do, and > it tracks moves/renames with history. Yeah, svn solves several of the problems with cvs, but it's also not exactly what I'd consider a "modern" RCS. We use svn where I work as well, but I've looked at git and bzr, and both seem to offer significantly more advantages. I haven't made a decision just yet on whether to jump to a new RCS. That's a big change to everyone's workflow, so I don't want this to be subject to only my whims. ---Brett. |
From: John A. T. <ja...@ja...> - 2008-01-01 21:58:08
|
brett lentz wrote: > Yeah, svn solves several of the problems with cvs, but it's also not > exactly what I'd consider a "modern" RCS. > > We use svn where I work as well, but I've looked at git and bzr, and > both seem to offer significantly more advantages. > > I haven't made a decision just yet on whether to jump to a new RCS. > That's a big change to everyone's workflow, so I don't want this to be > subject to only my whims. > I haven't used bzr but I have used git, and I find git only gives an advantage where you can have non-committers having their own "change branches" local to their machine. It also feels like it is just complete enough to get the job done -- now I love the command line and the unix philosophy of lots of small tools that you put together yourself to do interesting things more than most, but it still feels unpolished. So, if you want to switch, my preference would be svn. -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |
From: Erik V. <eri...@hc...> - 2008-01-01 22:40:27
|
I can only add that I would't like to be forced to use the command line, I prefer an Eclipse plugin. Erik. > -----Original Message----- > From: rai...@li... > [mailto:rai...@li...] On Behalf > Of John A. Tamplin > Sent: Tuesday 01 January 2008 22:58 > To: Dev...@sc...; > li...@sc...; > fo...@sc...; > "Ra...@sc...":an 18xx game > Subject: Re: [Rails-devel] 18AL named trains > > brett lentz wrote: > > Yeah, svn solves several of the problems with cvs, but it's also not > > exactly what I'd consider a "modern" RCS. > > > > We use svn where I work as well, but I've looked at git and bzr, and > > both seem to offer significantly more advantages. > > > > I haven't made a decision just yet on whether to jump to a new RCS. > > That's a big change to everyone's workflow, so I don't want > this to be > > subject to only my whims. > > > I haven't used bzr but I have used git, and I find git only gives an > advantage where you can have non-committers having their own "change > branches" local to their machine. It also feels like it is just > complete enough to get the job done -- now I love the command > line and > the unix philosophy of lots of small tools that you put together > yourself to do interesting things more than most, but it still feels > unpolished. > > So, if you want to switch, my preference would be svn. > > -- > John A. Tamplin ja...@ja... > 770/436-5387 HOME 4116 Manson Ave > Smyrna, GA 30082-3723 > > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: brett l. <wak...@gm...> - 2008-01-01 21:45:55
|
On Jan 1, 2008 7:00 AM, Erik Vos <eri...@hc...> wrote: > For a start: Happy New Year to you all! > > > "Game" is starting to look awfully > > out of place > > in our namespace. Perhaps sometime in the future we should consider > > refactoring that a little. > > I have thought about that too. > Perhaps we could move the "static" objects > (like trains, certificates, tokens, phases, maphex etc.) to a subpackage, > e.g. rails.game.objects. > And the Rounds to e.g. rails.game.rounds, > leaving a mixed bag of managers, Portfolio, exceptions etc. > in the current package. > I think that's a good approach, it will help with the ultimate goal of phasing out the Game namespace altogether. However, I think we could very easily keep Game around until we split it up into Client and Server components. Erik - are you happy with 18AL's playability? I'd like to make a new release as soon as it's "done". ---Brett. |
From: Erik V. <eri...@hc...> - 2008-01-01 22:47:01
|
> > > "Game" is starting to look awfully > > > out of place > > > in our namespace. > I think that's a good approach, it will help with the ultimate goal of > phasing out the Game namespace altogether. What's wrong with game? > However, I think we could very easily keep Game around until we split > it up into Client and Server components. Ah OK, that's a good starting point. I think the client will (should) need the current rails.ui, the static objects that I mentioned (e.g. in rails.game.objects) and the rails.game.action (PossibleAction) packages, and little else. The static objects should somehow be synchronized at game start. The action objects are the main mean of dynamic info transport between client and server. So it would make sense to put these in some common group. > Erik - are you happy with 18AL's playability? I'd like to make a new > release as soon as it's "done". Yes, I consider it done. When starting with 1851, I found a bug in the start round logic, so please await my next commit, but then it's time for a new release indeed. Erik. |
From: brett l. <wak...@gm...> - 2008-01-02 00:00:05
|
On Jan 1, 2008 2:47 PM, Erik Vos <eri...@hc...> wrote: > > Erik - are you happy with 18AL's playability? I'd like to make a new > > release as soon as it's "done". > > Yes, I consider it done. > When starting with 1851, I found a bug in the start round logic, > so please await my next commit, but then it's time for a new release indeed. Ok. Sounds good to me. ---Brett. |
From: John D. G. <jd...@di...> - 2007-12-22 17:07:45
|
Erik Vos wrote: > 2. Another new aspect is that the train naming ability does not disappear > when the private closes. So I had to implement a new way to make it > permanent by moving the special ability object from the private to the > company portfolio. Why not treat the name chits as token-like objects which can be placed on trains (as they are in the game)? > BTW I think the term (and class name) SpecialProperty should perhaps be > replaced by SpecialAbility, as I find the latter a lot more descriptive. Does the class cover such properties as "the B&O private closes when the B&O corporation acquires a train" and/or "Coal company X must exchange for share Y when all other shares of Y have been purchased by players"? Those are not actions the player would choose, so I wouldn't call them abilities. |
From: Erik V. <eri...@hc...> - 2007-12-22 17:33:46
|
> Erik Vos wrote: > > 2. Another new aspect is that the train naming ability does > not disappear > > when the private closes. So I had to implement a new way to make it > > permanent by moving the special ability object from the > private to the > > company portfolio. > > Why not treat the name chits as token-like objects which can > be placed on > trains (as they are in the game)? Yes, that is what happens. There is a difference between the NameTrains special ability, which has the effect that the operating company owning it can assign name tokens to trains, and the name tokens, which are NamedTrainToken objects, that can be linked to individual trains. Technically these remain owned by the special ability, though. Each of the named train tokens has a long and a short name. The short name is shown in the OR Window. For instance, a 5-train named "Robert E. Lee" is displayed as 5'RELee'. > > BTW I think the term (and class name) SpecialProperty > should perhaps be > > replaced by SpecialAbility, as I find the latter a lot more > descriptive. > > Does the class cover such properties as "the B&O private > closes when the > B&O corporation acquires a train" and/or "Coal company X must > exchange for > share Y when all other shares of Y have been purchased by > players"? Those > are not actions the player would choose, so I wouldn't call > them abilities. That's right. The way it's currently implemented, the B&O private closing is a property of the B&O corporation, but that isn't very relevant here. The latter case I haven't encountered yet. But your point is taken, perhaps I'll leave it as is. Erik. > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@hc...> - 2008-01-02 14:16:27
|
OK, done. There was a bug in StartRoundWindow in handling par price setting for President's shares that come with privates. Erik. > -----Original Message----- > From: rai...@li... > [mailto:rai...@li...] On Behalf > Of brett lentz > Sent: Wednesday 02 January 2008 01:00 > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] 18AL named trains > > On Jan 1, 2008 2:47 PM, Erik Vos <eri...@hc...> wrote: > > > Erik - are you happy with 18AL's playability? I'd like to > make a new > > > release as soon as it's "done". > > > > Yes, I consider it done. > > When starting with 1851, I found a bug in the start round logic, > > so please await my next commit, but then it's time for a > new release indeed. > > Ok. Sounds good to me. > > ---Brett. > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: brett l. <wak...@gm...> - 2008-01-02 18:32:46
|
On Jan 2, 2008 6:16 AM, Erik Vos <eri...@hc...> wrote: > OK, done. > > There was a bug in StartRoundWindow in handling par price setting > for President's shares that come with privates. > Alright. I'll start cooking up a new release. ---Brett. |