#70 Call EndTurnDelegate's start() from RevisedTest's multi-transport test

Unstable (example)
closed-rejected
None
5
2014-01-20
2013-07-24
No

Right now, you must call the MoveDelegate twice in each turn because certain things only happen during the "non-combat" version which runs the second time (clearing unit movement, etc.). To add support for 1914, it must be possible to have a single move phase in each turn.

This is the first step towards moving this end-of-turn clean-up to the EndTurnDelegate. The RevisedTest assumes that calling the move delegate's start/end multiple times will clear transport loading/unloading limits. Call the EndTurnDelegate from the test so that when the code is moved there it will continue to work.

This had an issue where the EndTurnDelegate tries to display the report, and the call to RemotePlayer returns null. I'm not entirely sure why since the unit test infrastructure creates a DummyPlayer. Perhaps there's a better way to fix this, but the solution I found was to move the report display to EndTurnDelegate's end()

1 Attachments

Discussion

  • David Landry

    David Landry - 2013-07-26

    After discussion with Veqryn, moving this to EndTurn is too risky a change. So here's a new patch. I've undone the change to the RevisedTest, but kept the change to move the EndTurnReport to end().

    This is in anticipation of a future 1914 unit test that will need to call EndTurnDelegate.start()

     
  • Chris Duncan

    Chris Duncan - 2014-01-20
    • status: open --> closed-rejected
    • assigned_to: Chris Duncan
     
  • Chris Duncan

    Chris Duncan - 2014-01-20

    sorry but no,
    we do not put anything that requires user input in the end() methods

    what is the reason for this change, what are you trying to accomplish?

     
  • David Landry

    David Landry - 2014-01-20

    That's fine. This was required for my initial fix for the unit movement clearing (when I was moving it to end of turn). Now that it's being done as a stepProperty and doesn't impact any existing functionality, this patch is not needed.

     
  • David Landry

    David Landry - 2014-01-20

    Although, when I go to write a unit test for 1914 I will need to find a solution to this problem since I will need to create an EndTurnDelegate in the unit test.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks