Opened 8 years ago

Closed 7 years ago

#410 closed enhancement (fixed)

Create "N units per M models in parent unit" requirement

Reported by: ibboard Owned by: ibboard
Priority: major Milestone: WarFoundry API 0.2
Component: WarFoundry-API Version: Unknown or N/A
Keywords: containership requirement Cc:
Blocked By: Blocking:

Description

Some units (e.g. Beast Packs) would be best handled with a "N units per M models in parent unit" requirement. This requirement would let you have 1 beast pack per beast master, where the beast pack is a sub-unit and the parent unit is a unit of beast masters of variable size.

Change History (19)

comment:1 Changed 8 years ago by ibboard

Status: newconfirmed

comment:2 Changed 8 years ago by ibboard

Keywords: requirement added

comment:3 Changed 8 years ago by ibboard

Owner: set to ibboard
Status: confirmedaccepted

comment:4 Changed 7 years ago by IBBoard <dev@…>

In f48c49b537385c4877f21e1ac1ebaa072302df64/IBBoard.WarFoundry.API:

Re #410: "N units per M models in parent" requirement

  • Add a "context" object that will hold the parent unit (or possibly other stuff)
  • Update all method signatures and calls

comment:5 Changed 7 years ago by IBBoard <dev@…>

In e0641e0eb86c57911f5a635b3e85ad9dbe1bf952/IBBoard.WarFoundry.API:

Re #410: "N units per M models in parent" requirement

  • Move context to a sub-folder/namespace to reduce clutter
  • Add simple "parent unit" context

comment:6 Changed 7 years ago by IBBoard <dev@…>

In 248df19652f95cc30d800bd276c21804545ad019/IBBoard.WarFoundry.API:

Re #410: Create "N units per M models in parent unit" requirement

  • Add null adding context
  • Add initial skeleton of "N units per M models in parent unit" requirement
  • Update use of context
  • Standardise some of "is applicable" testing

comment:7 Changed 7 years ago by IBBoard <dev@…>

In c082a312a7412fe82c44884339fcd6ac949eb450/IBBoard.WarFoundry.API:

Re #410: Create "N units per M models in parent unit" requirement

  • Tweak validation failure message for more likely case of multiple children

comment:8 Changed 7 years ago by IBBoard <dev@…>

In aac77204ae0ead0219db11c91536a3c983e4cd58/IBBoard.WarFoundry.API:

Re #410: Create "N units per M models in parent unit" requirement

  • Add methods to Army and ArmyCategory to get units of a given type
  • Implement validation on "N models in parent for M units" requirement

comment:9 Changed 7 years ago by IBBoard <dev@…>

In e35fc85eda2b015695e86477ca2d580213afd1fa/IBBoard.WarFoundry.API:

Re #410: Create "N units per M models in parent unit" requirement

  • Add factory to create requirements
  • Add methods to allow things other than 1:1 values for N and M

comment:10 Changed 7 years ago by IBBoard <dev@…>

In a41c2bc1683a431cfcc6a2c1850b121f970caea0/IBBoard.WarFoundry.API:

Re #410: M units for N parent models requirement

  • Fix text string for requirement failure

comment:11 Changed 7 years ago by IBBoard <dev@…>

In 4e1895ef9269d735e44c8bbfddda6e5190c8242c/IBBoard.WarFoundry.API:

Re #410: Create "N units per M models in parent unit" requirement

  • Update sample race to use new requirement

comment:12 Changed 7 years ago by IBBoard <dev@…>

In 5e03b68dd21483801b1e30155cc19e42a7c50e7c/IBBoard.WarFoundry.API.Tests:

Re #410: Create "N units per M models in parent unit" requirement

  • Add required usage of context objects
  • Add tests for new requirement
  • Add some extras to test unit type setup that the new requirement needs

comment:13 Changed 7 years ago by IBBoard <dev@…>

In fdebdeb52a408903111d4e20a6fb65448ee085bc/IBBoard.WarFoundry.API.Tests:

Re #410: Create "N units per M models in parent unit" requirement

  • Finish "adding" tests
  • Add common methods for handling adding units

comment:14 Changed 7 years ago by IBBoard <dev@…>

In 99248d05ba9cb13fc0974ef4fcb422120379d950/IBBoard.WarFoundry.API.Tests:

Re #410: Create "N units per M models in parent unit" requirement

  • Add "add unit" test helper method that sets a unit name
  • Add validation tests

comment:15 Changed 7 years ago by IBBoard <dev@…>

In e418ba645d06c06b2600edc49a78f501f5771b7e/IBBoard.WarFoundry.API.Tests:

Re #410: Create "N units per M models in parent unit" requirement

  • Add tests, based on NUnitsForMUnits requirement factory

TODO:

  • Test new methods on adding to requirement properly (e.g. multiple requirements for multi-parentage don't break things)
  • Test loading from XML (manually?)

comment:16 Changed 7 years ago by IBBoard <dev@…>

In d122354eeebcde4e2b04376437644954c474540a/IBBoard.WarFoundry.API.Tests:

Re #410: N per M models in parent requirement

  • Add tests for adding
  • Change text on adding to make more sense (tell users N, M, and how many there are now)

comment:17 Changed 7 years ago by IBBoard <dev@…>

In 4f01fdc3bb411e5bdb540d321ffe85429ebb2d5f/IBBoard.WarFoundry.API:

Re #410: Create "N units per M models in parent unit" requirement

  • Make sure that adding context is in at the top level and propagated through requirement handling

comment:18 Changed 7 years ago by IBBoard <dev@…>

In be409428bbea9259d1367fb2aac1fd5253f45e28/IBBoard.WarFoundry.API.Tests:

Re #410: Create "N units per M models in parent unit" requirement

  • Make sure signatures match new interface signature

comment:19 Changed 7 years ago by ibboard

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.