[messages] [Module Design] At-Start Stack position using Named location

danj3000 danj3000 at outlook.com
Thu Sep 21 15:42:45 CEST 2017


In SetupStack there is this method:


Code:
 protected Board getConfigureBoard() {

    Board board = null;

    // DJ1: return owning board
    if (map != null && !OwningBoardPrompt.ANY.equals(owningBoardName)) {
      board = map.getBoardPicker().getBoard(owningBoardName);
    }

    // DJ2: no owning board
    if (board == null && map != null) {
      String[] allBoards =
map.getBoardPicker().getAllowableBoardNames(); // DJ3: gets all allowed
boards
      if (allBoards.length > 0) {
        board = map.getBoardPicker().getBoard(allBoards[0]); // DJ4:
returns first in list
      }
    }

    return board;
  }



I think it would make sense to get chosen boards (i.e.
BoardPicker.getSelectedBoards()) and if necessary take the first. Before
then testing for board == null and getting all allowed boards.

Any thoughts?

Dan

_______________________________________________
Read this topic online here:
http://www.vassalengine.org/forum/viewtopic.php?p=54218#p54218


More information about the messages mailing list