Closed smabuk closed 6 months ago
This implements and closes #44.
I've tried to do this in a way that has minimal impact on the existing classes.
Format of the input is:
Actors <blank line> Board
Comma delimited list of attributes Name, startX, startY, speed, direction, behaviour, optional behaviour parameters
Name
startX
startY
speed
direction
behaviour
optional behaviour parameters
Having a name of CapMan represents the player and the behaviour is ignored
CapMan
So our standard starting positions looks like:
CapMan , (14, 23), 8, Left , manual targetsPlayer , (14, 11), 4, Down , TargetPlayerTile clydeEnemy , (11, 14), 4, Left , Clyde , (11, 13), (11, 15), (13, 11) targetAhead , (13, 15), 4, Right, Bob , (13, 15), (13, 13), (13, 11) whimsicalEnemy , (16, 14), 4, Left , Whimsical, (16, 15), (16, 13), (13, 11), targetsPlayer ╭────────────╮╭────────────╮ │............││............│ │.╭──╮.╭───╮.││.╭───╮.╭──╮.│ │O│ │.│ │.││.│ │.│ │O│ │.╰──╯.╰───╯.╰╯.╰───╯.╰──╯.│ │..........................│ │.╭──╮.╭╮.╭──────╮.╭╮.╭──╮.│ │.╰──╯.││.╰──╮╭──╯.││.╰──╯.│ │......││....││....││......│ etc.
The parentheses are optional, but make the input easier to understand.
Noticed that there were hard-coded tile positions embedded in some of the behaviours. This also fixes that.
This implements and closes #44.
I've tried to do this in a way that has minimal impact on the existing classes.
Input format
Format of the input is:
Actors
Comma delimited list of attributes
Name
,startX
,startY
,speed
,direction
,behaviour
,optional behaviour parameters
Having a name of
CapMan
represents the player and the behaviour is ignoredExample
So our standard starting positions looks like:
Notes
The parentheses are optional, but make the input easier to understand.
Noticed that there were hard-coded tile positions embedded in some of the behaviours. This also fixes that.