From: Erik V. <eri...@hc...> - 2005-08-10 03:32:30
|
I have committed a bunch of (minor) changes: 1. The UI package is cleaned up, several unused classes have been removed. 2. I have restructured parsing of CompanyManager.xml to avoid duplicate parsing code in CompanyType and Company. CompanyType now builds a "dummy company" with all the properties of the <CompanyType> element. During parsing of each <Company> element, first that dummy company is cloned, and then the contents of <Company> are applied. This way, <CompanyType> creates a default which can be overridden in <Company> elements of the same type. Of course, <Company> must at least contain a company name! 3. GameTest now creates an extra MapWindow, containing either an E/W or a N/S oriented map, as appropriate for the game. The relevant HexMap subclass is specified in Map.xml. Currently, just Brett's fixed maps are shown, the rest of Map.xml is ignored. I will try to work on that next. Erik. |
From: Erik V. <eri...@hc...> - 2008-12-23 20:41:26
|
I have committed a bunch of changes to the code base. Most of these deal with a more uniform handling of round initialization. This does not cause any functional changes, but it does look a bit better, and it also might help paving the way for better configurability of the sequence of rounds, most of which is now hardcoded. Last but not least, I think it will please Mark ;-) I have taken Jean's implicit hint and replaced GameManager.createRound() by two new methods of the same name, which create Round objects via one-argument and two-argument constructors, respectively. The one-argument constructor is used by "top-level" rounds (start, stock, operating rounds and 18EU's Final Minor Exchange Round), and pass the gameManager object that every round needs. The two-argument constructor is used by "subrounds", which briefly interrupt a top-level round, and get the parent round object in addition to the gameManager object. Existing subrounds are TreasuryShareRound and ShareSelling round, both being SR-like steps in an operating round. In a number of round classes I have also moved some initialization code from the start() methods to the constructors. The no-argument constructors are no longer used and have been removed (in Round it is now private). I have fairly extensively tested the consequences of all these changes, and while doing so I discovered and fixed a few long-standing bugs. The first and worst is, that in 18EU the Final Minor Exchange Round was started immediately after the OR in which the first 5-train was bought, rather than just before the next Stock Round (this makes a difference if the first 5-train is bought in an odd OR). Also, the first player to act was not the first but the last player buying a 5-train. It's unfortunate that I discovered these pretty serious bugs just hours after Brett announced the release of the new version 1.0.6. A second problem existed in 1830-style start rounds, where in some (I think rare) circumstances bidding (or rather: passing) would never end (perhaps Mark is right in disliking pass counting - that is where it went wrong in the case I found). For the rest the changes contain some cleanups and automatic comment/annotation insertions by Eclipse. Happy holidays to all of you. Erik |
From: Mark S. <mar...@gm...> - 2008-12-24 02:38:59
|
Erik, Yes.. the changes will make me happier. Tossing out constructors that no code uses is fine. I have not had a chance yet to check out your updates to see how well they work, but I hope to have some time over the holidays. No promises. My wife's parents are arriving from China for a visit on the 26th. As for finding the bugs "hours after the release"... Don't worry too much about that. That sort of stuff always happens. I will point out again that counting passes is a wrong way to do it. Each player object should know if it has passed, and the Player Manager object should summarize the passes for any routine that cares to know. But there may need to be a special sub-class of the PlayerManager class, called something like "AuctionManager" that will keep track of those players who have bid on something and are allowed into the auction. I wish you all Happy Holidays... Mark On Tue, Dec 23, 2008 at 3:41 PM, Erik Vos <eri...@hc...> wrote: > I have committed a bunch of changes to the code base. Most of these deal > with a more uniform handling of round initialization. This does not cause > any functional changes, but it does look a bit better, and it also might > help paving the way for better configurability of the sequence of rounds, > most of which is now hardcoded. Last but not least, I think it will please > Mark ;-) > > I have taken Jean's implicit hint and replaced GameManager.createRound() by > two new methods of the same name, which create Round objects via > one-argument and two-argument constructors, respectively. The one-argument > constructor is used by "top-level" rounds (start, stock, operating rounds > and 18EU's Final Minor Exchange Round), and pass the gameManager object > that > every round needs. The two-argument constructor is used by "subrounds", > which briefly interrupt a top-level round, and get the parent round object > in addition to the gameManager object. Existing subrounds are > TreasuryShareRound and ShareSelling round, both being SR-like steps in an > operating round. In a number of round classes I have also moved some > initialization code from the start() methods to the constructors. The > no-argument constructors are no longer used and have been removed (in Round > it is now private). > > I have fairly extensively tested the consequences of all these changes, and > while doing so I discovered and fixed a few long-standing bugs. > > The first and worst is, that in 18EU the Final Minor Exchange Round was > started immediately after the OR in which the first 5-train was bought, > rather than just before the next Stock Round (this makes a difference if > the > first 5-train is bought in an odd OR). Also, the first player to act was > not > the first but the last player buying a 5-train. > > It's unfortunate that I discovered these pretty serious bugs just hours > after Brett announced the release of the new version 1.0.6. > > A second problem existed in 1830-style start rounds, where in some (I think > rare) circumstances bidding (or rather: passing) would never end (perhaps > Mark is right in disliking pass counting - that is where it went wrong in > the case I found). > > For the rest the changes contain some cleanups and automatic > comment/annotation insertions by Eclipse. > > Happy holidays to all of you. > > Erik > > > > ------------------------------------------------------------------------------ > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: brett l. <wak...@gm...> - 2008-12-24 03:57:12
|
On Tue, Dec 23, 2008 at 12:41 PM, Erik Vos <eri...@hc...> wrote: > It's unfortunate that I discovered these pretty serious bugs just hours > after Brett announced the release of the new version 1.0.6. > It's ok. I'd prefer to release more often than twice a year. Perhaps we should target the end of next month for another release? What do you think? Happy holidays to you guys as well. :) ---Brett. |
From: Erik V. <eri...@xs...> - 2009-11-27 21:22:16
|
- Beautified the Report (window and log) by inserting more space and highlighting round starts. The type of GUI Object used (JTextArea) does not allow highlighting by fonts and colors, so I have added horizontal lnes of various types. - Added a new option "report.window.open" to my_properties that, if the value is "yes", will open the Report Window at game start. The default remains closed. - Added a new option "or.number_format" that allows choosing the OR number format. The default remains x.y (where x is the number of the previous SR, and y runs 1..3). By setting or.number_format=simple, the OR number is a simple integer that runs from 1 upwards. - The OR window title has been modified: it now displays "Operating Round x (y of z)" where x is either a simple or composite OR number. Erik. |
From: Jim B. <jim...@ya...> - 2009-11-28 01:52:48
|
A quick comment on the report window- I don't mind the text details, but I wish "search" worked within that window- for example, to scroll through the log and review "B&O" actions in an 1830 game, I need to select/copy/paste the whole log into a blank window in notepad/textedit, and then search from there- dunno if I'm missing something, but that is awkward. If there's some way to turn- on a search option easily, it would be very helpful. best, - jim On Nov 27, 2009, at 1:10 PM, Erik Vos wrote: > - Beautified the Report (window and log) by inserting more space and > highlighting round starts. > The type of GUI Object used (JTextArea) does not allow highlighting > by fonts > and colors, > so I have added horizontal lnes of various types. > > - Added a new option "report.window.open" to my_properties > that, if the value is "yes", will open the Report Window at > game start. The default remains closed. > > - Added a new option "or.number_format" that allows > choosing the OR number format. The default remains x.y > (where x is the number of the previous SR, and y runs 1..3). > By setting or.number_format=simple, the OR number > is a simple integer that runs from 1 upwards. > > - The OR window title has been modified: it now displays > "Operating Round x (y of z)" where x is either a simple > or composite OR number. > > Erik. > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2009-11-28 11:18:12
|
Jim, I think it can be done, but it is not a standard thing already supported that just needs to be switched on. It'll have to be programmed. JTextArea supports catching keystrokes and selecting text, so there is a basis to build finding on top of. The current ReportWindow, built on JTextArea, was a contribution from Jonathan Ferro exactly one year ago (previously it was a JLabel). I don't know if he or someone else would be interested to work on a Find feature? About specifications: assuming that ctrl-F starts Find, what would be suitable keystrokes for Find Next and Find Previous? Erik. > -----Original Message----- > From: Jim Black [mailto:jim...@ya...] > Sent: Saturday 28 November 2009 02:47 > To: Development list for Rails: an 18xx game > Subject: Re: [Rails-devel] Changes > > A quick comment on the report window- I don't mind the text details, > but I wish "search" worked within that window- > > for example, to scroll through the log and review "B&O" > actions in an > 1830 game, I need to select/copy/paste the whole log into a blank > window in notepad/textedit, and then search from there- dunno if I'm > missing something, but that is awkward. If there's some way to turn- > on a search option easily, it would be very helpful. > > best, > - jim > > > On Nov 27, 2009, at 1:10 PM, Erik Vos wrote: > > > - Beautified the Report (window and log) by inserting more space and > > highlighting round starts. > > The type of GUI Object used (JTextArea) does not allow > highlighting > > by fonts > > and colors, > > so I have added horizontal lnes of various types. > > > > - Added a new option "report.window.open" to my_properties > > that, if the value is "yes", will open the Report Window at > > game start. The default remains closed. > > > > - Added a new option "or.number_format" that allows > > choosing the OR number format. The default remains x.y > > (where x is the number of the previous SR, and y runs 1..3). > > By setting or.number_format=simple, the OR number > > is a simple integer that runs from 1 upwards. > > > > - The OR window title has been modified: it now displays > > "Operating Round x (y of z)" where x is either a simple > > or composite OR number. > > > > Erik. > > > > > > > -------------------------------------------------------------- > ---------------- > > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 > > 30-Day > > trial. Simplify your report design, integration and > deployment - and > > focus on > > what you do best, core application coding. Discover what's new with > > Crystal Reports now. http://p.sf.net/sfu/bobj-july > > _______________________________________________ > > Rails-devel mailing list > > Rai...@li... > > https://lists.sourceforge.net/lists/listinfo/rails-devel > > > > -------------------------------------------------------------- > ---------------- > Let Crystal Reports handle the reporting - Free Crystal > Reports 2008 30-Day > trial. Simplify your report design, integration and > deployment - and focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: John A. T. <ja...@ja...> - 2009-11-28 15:53:40
|
Erik Vos wrote: > About specifications: assuming that ctrl-F starts Find, > what would be suitable keystrokes for Find Next and Find Previous? > ^N and ^P Note that on Mac you should use Command rather than Ctrl (InputEvent.ALT_DOWN_MASK). -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |
From: Jim B. <jim...@ya...> - 2009-11-28 19:02:31
|
Erik, Thanks for looking into this. On the Mac, the standard key bindings for Find are: command-F for find command-G for find-next shift-command-G for find-prev On Windows, I don't know... - jim PS. While we're on the subject of the report-log/window- I also wish players could make comments into that log, during their move. It makes for a more complete game record (since players can annotate their moves, in context)- but, moreover, it adds a human touch to the game record, and just helps keep pbem games more social/interactive. Nothing as complex as an interactive chat window, presence/etc- rather, just the ability to annotate the game log with short, textual comments (which would be saved in the game file, with the rest of the game log). On Nov 28, 2009, at 3:18 AM, Erik Vos wrote: > Jim, > > I think it can be done, but it is not a standard thing > already supported that just needs to be switched on. > It'll have to be programmed. JTextArea supports > catching keystrokes and selecting text, so there is > a basis to build finding on top of. > > The current ReportWindow, built on JTextArea, was > a contribution from Jonathan Ferro exactly one year ago > (previously it was a JLabel). > I don't know if he or someone else would be interested > to work on a Find feature? > > About specifications: assuming that ctrl-F starts Find, > what would be suitable keystrokes for Find Next and Find Previous? > > Erik. > >> -----Original Message----- >> From: Jim Black [mailto:jim...@ya...] >> Sent: Saturday 28 November 2009 02:47 >> To: Development list for Rails: an 18xx game >> Subject: Re: [Rails-devel] Changes >> >> A quick comment on the report window- I don't mind the text details, >> but I wish "search" worked within that window- >> >> for example, to scroll through the log and review "B&O" >> actions in an >> 1830 game, I need to select/copy/paste the whole log into a blank >> window in notepad/textedit, and then search from there- dunno if I'm >> missing something, but that is awkward. If there's some way to turn- >> on a search option easily, it would be very helpful. >> >> best, >> - jim >> >> >> On Nov 27, 2009, at 1:10 PM, Erik Vos wrote: >> >>> - Beautified the Report (window and log) by inserting more space and >>> highlighting round starts. >>> The type of GUI Object used (JTextArea) does not allow >> highlighting >>> by fonts >>> and colors, >>> so I have added horizontal lnes of various types. >>> >>> - Added a new option "report.window.open" to my_properties >>> that, if the value is "yes", will open the Report Window at >>> game start. The default remains closed. >>> >>> - Added a new option "or.number_format" that allows >>> choosing the OR number format. The default remains x.y >>> (where x is the number of the previous SR, and y runs 1..3). >>> By setting or.number_format=simple, the OR number >>> is a simple integer that runs from 1 upwards. >>> >>> - The OR window title has been modified: it now displays >>> "Operating Round x (y of z)" where x is either a simple >>> or composite OR number. >>> >>> Erik. >>> >>> >>> >> -------------------------------------------------------------- >> ---------------- >>> Let Crystal Reports handle the reporting - Free Crystal >> Reports 2008 >>> 30-Day >>> trial. Simplify your report design, integration and >> deployment - and >>> focus on >>> what you do best, core application coding. Discover what's new with >>> Crystal Reports now. http://p.sf.net/sfu/bobj-july >>> _______________________________________________ >>> Rails-devel mailing list >>> Rai...@li... >>> https://lists.sourceforge.net/lists/listinfo/rails-devel >> >> >> >> -------------------------------------------------------------- >> ---------------- >> Let Crystal Reports handle the reporting - Free Crystal >> Reports 2008 30-Day >> trial. Simplify your report design, integration and >> deployment - and focus on >> what you do best, core application coding. Discover what's new with >> Crystal Reports now. http://p.sf.net/sfu/bobj-july >> _______________________________________________ >> Rails-devel mailing list >> Rai...@li... >> https://lists.sourceforge.net/lists/listinfo/rails-devel > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 > 30-Day > trial. Simplify your report design, integration and deployment - and > focus on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: John D. G. <jd...@di...> - 2009-11-28 19:17:38
|
Jim Black wrote: > On the Mac, the standard key bindings for Find are: > command-F for find > command-G for find-next > shift-command-G for find-prev > > On Windows, I don't know... Ctrl-F for find is standard on Windows (used in Mozilla, Notepad, etc.) However, some apps (Word, Regedit) don't let you do it in one keystroke; for them, ctrl-F means find-next. For apps where ctrl-F means find, there is no standard binding for find-next. Mozilla uses ctrl-G, Notepad uses F3. *No* Windows app has a binding for find-prev. I suggest ctrl-F find, ctrl-G find-next, Alt-G find-prev, which is as close to the Mac bindings as you're going to achieve on a PC. (Ctrl-Shift-x, where x is a letter, may not be distinguishable from Ctrl-x on a PC, especially if the user is careless about the Caps Lock setting as most people are.) |
From: John A. T. <ja...@ja...> - 2009-11-28 19:22:55
|
John David Galt wrote: > I suggest ctrl-F find, ctrl-G find-next, Alt-G find-prev, which is as > close to the Mac bindings as you're going to achieve on a PC. > (Ctrl-Shift-x, where x is a letter, may not be distinguishable from > Ctrl-x on a PC, especially if the user is careless about the Caps Lock > setting as most people are.) > Caps lock has no effect on whether shift is detected -- the Swing key events happen at actual keypress/release level, not the interpreted result of those key presses. So, you set an action listener on the key G pressed with a particular set of modifiers, in this case either Ctrl/Alt (Alt if on Mac, which maps to Cmd) and Shift to get find-previous. That will happen regardless of whether Caps lock is on or off. -- John A. Tamplin ja...@ja... 770/436-5387 HOME 4116 Manson Ave Smyrna, GA 30082-3723 |
From: Erik V. <eri...@hc...> - 2009-11-28 22:51:28
|
> PS. While we're on the subject of the report-log/window- I > also wish > players could make comments into that log, during their move. It > makes for a more complete game record (since players can annotate > their moves, in context)- but, moreover, it adds a human > touch to the > game record, and just helps keep pbem games more > social/interactive. > Nothing as complex as an interactive chat window, presence/etc- > rather, just the ability to annotate the game log with short, > textual > comments (which would be saved in the game file, with the > rest of the > game log). That was an easy one, for a change. The report window can be made editable by adding report.window.editable=yes to my.properties. I have also added File|Load and File|Save menu items to the Report Window. It will start at the report directory which you can define in my.properties by report.directory=.... It is NOT recommended to reuse the automatically created report file that the program already writes, because it will be overwritten by the program's own uncommented version. Perhaps I should add another switch to set this logging on/off independent from the directory setting (which now automatically triggers writing this report). NB This Save function does not propose any filename yet. But if you have loaded a report, the same name will be prosed for saving it. Comment: I have kept this commented report separate from the automatic report that is already written. In a future client/server model, the uncommented report will be created by the server, and your own commented version will be saved/loaded by the client. Erik. |
From: Erik V. <eri...@hc...> - 2009-11-29 15:58:49
|
While fiddling with the ReportWindow, I thought I could as well look at the requested Find function. I have done it, and for me it works. ctrl-F = Find ctrl-shift-F = Find backwards If the window is editable, searching starts at the cursor position, otherwise at the start/end. ctrl-G = Find Next ctrl-shift-G = Find Previous Both start at the currently selected text, possibly as a result of a previous Find, but (if the window is editable) you can also select text yourself and then do Find Next/Previous. In other words, Find Next/Previous does not necessarily start at the previous Find result. These actions are also available through the Edit menu of that window. There is also a greyed-out menu item File|Print, which is reseved for the future; printing hasn't been implemented yet. Erik. |
From: Chris S. <chr...@gm...> - 2009-11-28 04:47:26
|
I notice the OR numbering starts at 0 (at least in 18EU). Could there be an option to start numbering at 1? -- Chris Please consider the environment before printing this e-mail. On Fri, Nov 27, 2009 at 1:10 PM, Erik Vos <eri...@xs...> wrote: > - Beautified the Report (window and log) by inserting more space and > highlighting round starts. > The type of GUI Object used (JTextArea) does not allow highlighting by > fonts > and colors, > so I have added horizontal lnes of various types. > > - Added a new option "report.window.open" to my_properties > that, if the value is "yes", will open the Report Window at > game start. The default remains closed. > > - Added a new option "or.number_format" that allows > choosing the OR number format. The default remains x.y > (where x is the number of the previous SR, and y runs 1..3). > By setting or.number_format=simple, the OR number > is a simple integer that runs from 1 upwards. > > - The OR window title has been modified: it now displays > "Operating Round x (y of z)" where x is either a simple > or composite OR number. > > Erik. > > > > ------------------------------------------------------------------------------ > Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day > trial. Simplify your report design, integration and deployment - and focus > on > what you do best, core application coding. Discover what's new with > Crystal Reports now. http://p.sf.net/sfu/bobj-july > _______________________________________________ > Rails-devel mailing list > Rai...@li... > https://lists.sourceforge.net/lists/listinfo/rails-devel > |
From: Erik V. <eri...@xs...> - 2009-11-28 10:57:04
|
Yes, I noticed and fixed that too. Erik. _____ From: Chris Shaffer [mailto:chr...@gm...] Sent: Saturday 28 November 2009 05:47 To: Development list for Rails: an 18xx game Subject: Re: [Rails-devel] Changes I notice the OR numbering starts at 0 (at least in 18EU). Could there be an option to start numbering at 1? -- Chris Please consider the environment before printing this e-mail. On Fri, Nov 27, 2009 at 1:10 PM, Erik Vos <eri...@xs...> wrote: - Beautified the Report (window and log) by inserting more space and highlighting round starts. The type of GUI Object used (JTextArea) does not allow highlighting by fonts and colors, so I have added horizontal lnes of various types. - Added a new option "report.window.open" to my_properties that, if the value is "yes", will open the Report Window at game start. The default remains closed. - Added a new option "or.number_format" that allows choosing the OR number format. The default remains x.y (where x is the number of the previous SR, and y runs 1..3). By setting or.number_format=simple, the OR number is a simple integer that runs from 1 upwards. - The OR window title has been modified: it now displays "Operating Round x (y of z)" where x is either a simple or composite OR number. Erik. ---------------------------------------------------------------------------- -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Rails-devel mailing list Rai...@li... https://lists.sourceforge.net/lists/listinfo/rails-devel |
From: Erik V. <eri...@xs...> - 2010-03-05 20:59:38
|
On popular demand, I have reverted the removal of the full train cost string in the Game Status window. Fixed some issues with 1835 (all reported by Stefan Frey): - PfB extra tile/token lay hex is L6, not J6 - Added many missing tile upgrade options - Fixed token lay cost calculation. In a misguided attempt to be efficient, I created a complex algorthm that did not always find the shortest path. The search is now brute force, and not noticeably slower (although it takes more memory). A general fix is that the message "You must buy a train unless you have no route" is only displayed for companies that must own a train. Erik. |