From: Sean B. <sbr...@ya...> - 2007-07-01 16:38:49
|
Thanks, this has been committed with revision, http://triplea.svn.sourceforge.net/viewvc/triplea?view=rev&revision=1814 Could you add a unit test for this as well. Make a new test class called PacificTest (look at RevisedTest for a model). Then look at DiceRollTest to see how to add tests for this change. The battle display is still not quite right, so I opened a bug, http://sourceforge.net/tracker/index.php?func=detail&aid=1746101&group_id=44492&atid=439737 Thanks, Sean --- Kevin Comcowich <com...@ya...> wrote: > I've made changes to DiceRoll.java to account for > Japan's special turn one attack in Pacific. If you > have questions or comments, please feel free to > contact me via this email addy or comradekev at > users.sourceforge.net (I think I've got that one > figured out). > > Thanks, > Kevin > > > > > ____________________________________________________________________________________ > Building a website is a piece of cake. Yahoo! Small > Business gives you all the tools to get online. > http://smallbusiness.yahoo.com/webhosting > Index: C:/Program Files/Eclipse > SDK/eclipse/work/triplea/src/games/strategy/triplea/delegate/DiceRoll.java > =================================================================== > --- C:/Program Files/Eclipse > SDK/eclipse/work/triplea/src/games/strategy/triplea/delegate/DiceRoll.java > (revision 1792) > +++ C:/Program Files/Eclipse > SDK/eclipse/work/triplea/src/games/strategy/triplea/delegate/DiceRoll.java > (working copy) > @@ -261,7 +261,20 @@ > { > int strength; > if (defending) > - strength = > ua.getDefense(current.getOwner()); > + //If it's Pacific_Edition > and Japan's turn one, all but Chinese defend at a 1 > + { > + if > (bridge.getPlayerID().getData().getProperties().get(Constants.PACIFIC_EDITION, > false) > + && > bridge.getPlayerID().getData().getSequence().getRound() > == 1 > + && > bridge.getStepName().equals("japaneseBattle") > + && > !player.getName().equals("Chinese")) > + { > + strength = 1; > + } > + else > + { > + strength = > ua.getDefense(current.getOwner()); > + } > + } > else > { > strength = > ua.getAttack(current.getOwner()); > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 > express and take > control of your XML. No limits. Just data. Click to > get it now. > http://sourceforge.net/powerbar/db2/> _______________________________________________ > Triplea-developers mailing list > Tri...@li... > https://lists.sourceforge.net/lists/listinfo/triplea-developers > ____________________________________________________________________________________ Fussy? Opinionated? Impossible to please? Perfect. Join Yahoo!'s user panel and lay it on us. http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7 |