I want the /blueprint endpoint to eventually serve as the mechanism for a player to both view and edit the schematics and capabilities of various non-natural entities in the game. As a first deliverable, this will serve as the view/edit of the player's current ship. This will require persistence and some extra modeling.
Requirements:
- All Profiles in ATLAS has 1-M Ships
- A Ship has a non-null
name
- A Ship has many HullParts
- A HullPart has integer value
position which can be positive or negative
- A Ship requires at least one HullPart and that HullPart must have position = 0
- A HullPart has a positive integer, non-null
num_slots
- A HullPart has a positive integer, non-null
hitpoints
- A Ship has an aggregate
hitpoints which is the sum of all of the Ship's HullParts' hitpoints
When a Profile is created it starts with a ship with 5 HullParts going from [-2, 2]. Each HullPart has 2 num_slots and 10 hitpoints
The first draft of /blueprint will be a table depicting the ship and its hullparts. Each row of the table will be a HullPart, ordered positive-to-negative, top-down. The number of columns will be the max of the num_slots of all the ship's Hullparts + 1 more column showing hitpoints.
Above the table should be a label for the name of the ship and a Hitpoint: <hitpoints>
As of right now, /blueprint always defaults to the logged in user's ship. If no one is logged in, /blueprint redirects to the login/signup page.
I want the
/blueprintendpoint to eventually serve as the mechanism for a player to both view and edit the schematics and capabilities of various non-natural entities in the game. As a first deliverable, this will serve as the view/edit of the player's current ship. This will require persistence and some extra modeling.Requirements:
namepositionwhich can be positive or negativenum_slotshitpointshitpointswhich is the sum of all of the Ship's HullParts'hitpointsWhen a Profile is created it starts with a ship with 5 HullParts going from [-2, 2]. Each HullPart has 2
num_slotsand 10hitpointsThe first draft of
/blueprintwill be a table depicting the ship and its hullparts. Each row of the table will be a HullPart, ordered positive-to-negative, top-down. The number of columns will be the max of the num_slots of all the ship's Hullparts + 1 more column showing hitpoints.Above the table should be a label for the name of the ship and a
Hitpoint: <hitpoints>As of right now, /blueprint always defaults to the logged in user's ship. If no one is logged in, /blueprint redirects to the login/signup page.