@gamepark/rules-api 6.29.2 → 6.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Competitive.d.ts +1 -0
- package/dist/Competitive.js.map +1 -1
- package/dist/material/HiddenMaterialRules.d.ts +10 -10
- package/dist/material/HiddenMaterialRules.js.map +1 -1
- package/dist/material/MaterialGame.d.ts +3 -3
- package/dist/material/MaterialGameSetup.d.ts +9 -9
- package/dist/material/MaterialGameSetup.js.map +1 -1
- package/dist/material/MaterialRules.d.ts +19 -14
- package/dist/material/MaterialRules.js +65 -41
- package/dist/material/MaterialRules.js.map +1 -1
- package/dist/material/SecretMaterialRules.d.ts +3 -3
- package/dist/material/SecretMaterialRules.js.map +1 -1
- package/dist/material/items/Material.d.ts +5 -5
- package/dist/material/items/Material.js +2 -2
- package/dist/material/items/Material.js.map +1 -1
- package/dist/material/items/MaterialMutator.js +3 -0
- package/dist/material/items/MaterialMutator.js.map +1 -1
- package/dist/material/location/LocationBuilder.d.ts +10 -9
- package/dist/material/location/LocationBuilder.js +3 -0
- package/dist/material/location/LocationBuilder.js.map +1 -1
- package/dist/material/location/strategy/StackingStrategy.d.ts +12 -0
- package/dist/material/location/strategy/StackingStrategy.js +32 -0
- package/dist/material/location/strategy/StackingStrategy.js.map +1 -0
- package/dist/material/location/strategy/index.d.ts +2 -1
- package/dist/material/location/strategy/index.js +4 -1
- package/dist/material/location/strategy/index.js.map +1 -1
- package/dist/material/moves/MaterialMove.d.ts +3 -3
- package/dist/material/moves/local/DisplayHelp.d.ts +5 -5
- package/dist/material/moves/local/LocalMove.d.ts +1 -1
- package/dist/material/moves/rules/StartPlayerTurn.d.ts +1 -1
- package/dist/material/moves/rules/StartPlayerTurn.js.map +1 -1
- package/dist/material/moves/rules/StartRule.d.ts +1 -1
- package/dist/material/moves/rules/StartRule.js.map +1 -1
- package/dist/material/moves/rules/StartSimultaneousRule.d.ts +1 -1
- package/dist/material/moves/rules/StartSimultaneousRule.js.map +1 -1
- package/dist/material/rules/MaterialRulesPart.d.ts +8 -8
- package/dist/material/rules/MaterialRulesPart.js.map +1 -1
- package/dist/material/rules/PlayerTurnRule.d.ts +3 -3
- package/dist/material/rules/PlayerTurnRule.js.map +1 -1
- package/dist/material/rules/SimultaneousRule.d.ts +6 -6
- package/dist/material/rules/SimultaneousRule.js.map +1 -1
- package/dist/material/tutorial/TutorialState.d.ts +2 -2
- package/dist/options/OptionsSpec.d.ts +2 -0
- package/dist/utils/rank.util.js +1 -1
- package/dist/utils/rank.util.js.map +1 -1
- package/package.json +1 -1
package/dist/Competitive.d.ts
CHANGED
|
@@ -23,6 +23,7 @@ export interface CompetitiveScore<Game = any, Move = any, PlayerId = any> extend
|
|
|
23
23
|
* @returns the tie-breaker value for this player, or undefined if no tie-breaker exists at this point
|
|
24
24
|
*/
|
|
25
25
|
getTieBreaker?(tieBreaker: number, playerId: PlayerId): number | undefined;
|
|
26
|
+
rankByLowerScore?: boolean;
|
|
26
27
|
}
|
|
27
28
|
/**
|
|
28
29
|
* Interface to rank players in Competitive games that do not rely exclusively on scores to rank the players when game is over
|
package/dist/Competitive.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Competitive.js","sourceRoot":"","sources":["../src/Competitive.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"Competitive.js","sourceRoot":"","sources":["../src/Competitive.ts"],"names":[],"mappings":";;;AA8CA;;;;GAIG;AACH,SAAgB,aAAa,CAAuB,KAAgC;IAClF,OAAO,kBAAkB,CAAC,KAAK,CAAC,IAAI,iBAAiB,CAAC,KAAK,CAAC,CAAA;AAC9D,CAAC;AAFD,sCAEC;AAED;;;;GAIG;AACH,SAAgB,kBAAkB,CAAuB,KAAgC;IACvF,OAAO,OAAQ,KAAgD,CAAC,QAAQ,KAAK,UAAU,CAAA;AACzF,CAAC;AAFD,gDAEC;AAED;;;;GAIG;AACH,SAAgB,iBAAiB,CAAuB,KAAgC;IACtF,OAAO,OAAQ,KAA+C,CAAC,WAAW,KAAK,UAAU,CAAA;AAC3F,CAAC;AAFD,8CAEC"}
|
|
@@ -10,9 +10,9 @@ import { MaterialMove, MaterialMoveRandomized, MaterialMoveView } from './moves'
|
|
|
10
10
|
* If the game has secret information (some players have information not available to others, link cards in their hand), then you
|
|
11
11
|
* must implement {@link SecretMaterialRules} instead.
|
|
12
12
|
*/
|
|
13
|
-
export declare abstract class HiddenMaterialRules<P extends number = number, M extends number = number, L extends number = number> extends MaterialRules<P, M, L> implements HiddenInformation<MaterialGame<P, M, L>, MaterialMove<P, M, L>, MaterialMove<P, M, L>> {
|
|
13
|
+
export declare abstract class HiddenMaterialRules<P extends number = number, M extends number = number, L extends number = number, R extends number = number> extends MaterialRules<P, M, L, R> implements HiddenInformation<MaterialGame<P, M, L, R>, MaterialMove<P, M, L, R>, MaterialMove<P, M, L, R>> {
|
|
14
14
|
private readonly client?;
|
|
15
|
-
constructor(game: MaterialGame<P, M, L>, client?: {
|
|
15
|
+
constructor(game: MaterialGame<P, M, L, R>, client?: {
|
|
16
16
|
player?: P | undefined;
|
|
17
17
|
} | undefined);
|
|
18
18
|
/**
|
|
@@ -22,7 +22,7 @@ export declare abstract class HiddenMaterialRules<P extends number = number, M e
|
|
|
22
22
|
* See {@link HidingStrategy}
|
|
23
23
|
*/
|
|
24
24
|
abstract readonly hidingStrategies: Partial<Record<M, Partial<Record<L, HidingStrategy<P, L>>>>>;
|
|
25
|
-
randomize(move: MaterialMove<P, M, L>, player?: P): MaterialMove<P, M, L> & MaterialMoveRandomized<P, M, L>;
|
|
25
|
+
randomize(move: MaterialMove<P, M, L, R>, player?: P): MaterialMove<P, M, L> & MaterialMoveRandomized<P, M, L, R>;
|
|
26
26
|
private isRevealingItemMove;
|
|
27
27
|
/**
|
|
28
28
|
* Items that can be hidden cannot merge by default, to prevent hidden items to merge only because they have no id.
|
|
@@ -31,20 +31,20 @@ export declare abstract class HiddenMaterialRules<P extends number = number, M e
|
|
|
31
31
|
/**
|
|
32
32
|
* Moves that reveal some information (like drawing a card) cannot be predicted by the player.
|
|
33
33
|
*/
|
|
34
|
-
isUnpredictableMove(move: MaterialMove<P, M, L>, player: P): boolean;
|
|
34
|
+
isUnpredictableMove(move: MaterialMove<P, M, L, R>, player: P): boolean;
|
|
35
35
|
/**
|
|
36
36
|
* Moves than reveals an information to someone cannot be undone by default
|
|
37
37
|
*/
|
|
38
|
-
protected moveBlocksUndo(move: MaterialMove<P, M, L>): boolean;
|
|
38
|
+
protected moveBlocksUndo(move: MaterialMove<P, M, L, R>): boolean;
|
|
39
39
|
/**
|
|
40
40
|
* @param move A move to test
|
|
41
41
|
* @returns true if the move revealed something to some player
|
|
42
42
|
*/
|
|
43
|
-
protected moveRevealedSomething(move: MaterialMove<P, M, L>): boolean;
|
|
43
|
+
protected moveRevealedSomething(move: MaterialMove<P, M, L, R>): boolean;
|
|
44
44
|
/**
|
|
45
45
|
* With the material approach, we can offer a default working implementation for {@link HiddenInformation.getView}
|
|
46
46
|
*/
|
|
47
|
-
getView(player?: P): MaterialGame<P, M, L>;
|
|
47
|
+
getView(player?: P): MaterialGame<P, M, L, R>;
|
|
48
48
|
private hideItem;
|
|
49
49
|
private getItemHiddenPaths;
|
|
50
50
|
private itemHasHiddenInformation;
|
|
@@ -52,11 +52,11 @@ export declare abstract class HiddenMaterialRules<P extends number = number, M e
|
|
|
52
52
|
* To be able to know if a MoveItem cannot be undone, the server flags the moves with a "reveal" property.
|
|
53
53
|
* This difference must be integrated without error during the callback.
|
|
54
54
|
*/
|
|
55
|
-
canIgnoreServerDifference(clientMove: MaterialMove<P, M, L>, serverMove: MaterialMove<P, M, L>): boolean;
|
|
55
|
+
canIgnoreServerDifference(clientMove: MaterialMove<P, M, L, R>, serverMove: MaterialMove<P, M, L, R>): boolean;
|
|
56
56
|
/**
|
|
57
57
|
* With the material approach, we can offer a default working implementation for {@link HiddenInformation.getMoveView}
|
|
58
58
|
*/
|
|
59
|
-
getMoveView(move: MaterialMoveRandomized<P, M, L>, player?: P): MaterialMove<P, M, L>;
|
|
59
|
+
getMoveView(move: MaterialMoveRandomized<P, M, L, R>, player?: P): MaterialMove<P, M, L, R>;
|
|
60
60
|
private getMoveItemView;
|
|
61
61
|
private getMoveAtOnceView;
|
|
62
62
|
private getMoveItemRevealedPath;
|
|
@@ -68,7 +68,7 @@ export declare abstract class HiddenMaterialRules<P extends number = number, M e
|
|
|
68
68
|
/**
|
|
69
69
|
* Override of {@link MaterialRules.play} that also removes the hidden information from items, for example when a card is flipped face down
|
|
70
70
|
*/
|
|
71
|
-
play(move: MaterialMoveRandomized<P, M, L> | MaterialMoveView<P, M, L>, context?: PlayMoveContext): MaterialMove<P, M, L>[];
|
|
71
|
+
play(move: MaterialMoveRandomized<P, M, L, R> | MaterialMoveView<P, M, L, R>, context?: PlayMoveContext): MaterialMove<P, M, L, R>[];
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* A Hiding Strategy is a function that takes an item and returns a list of path to hide in the item object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HiddenMaterialRules.js","sourceRoot":"","sources":["../../src/material/HiddenMaterialRules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAA0C;AAC1C,mDAA4B;AAC5B,2DAAoC;AACpC,+DAAwC;AACxC,mDAA4B;AAC5B,uDAAgC;AAKhC,iDAA+C;AAC/C,iCAegB;AAGhB;;;;;GAKG;AACH;IACU,
|
|
1
|
+
{"version":3,"file":"HiddenMaterialRules.js","sourceRoot":"","sources":["../../src/material/HiddenMaterialRules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAA0C;AAC1C,mDAA4B;AAC5B,2DAAoC;AACpC,+DAAwC;AACxC,mDAA4B;AAC5B,uDAAgC;AAKhC,iDAA+C;AAC/C,iCAegB;AAGhB;;;;;GAKG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AAS,GAAmB,cAAM,OAAA,CAAC,UAAU,CAAC,EAAZ,CAAY,CAAA;AAA9C,QAAA,SAAS,aAAqC"}
|
|
@@ -14,13 +14,13 @@ import { TutorialState } from './tutorial';
|
|
|
14
14
|
* @property droppedItem Item that was just dropped on the client side
|
|
15
15
|
* @property tutorial The {@link TutorialState}, only set for tutorial games
|
|
16
16
|
*/
|
|
17
|
-
export type MaterialGame<Player extends number = number, MaterialType extends number = number, LocationType extends number = number> = {
|
|
17
|
+
export type MaterialGame<Player extends number = number, MaterialType extends number = number, LocationType extends number = number, RuleId extends number = number> = {
|
|
18
18
|
players: Player[];
|
|
19
19
|
items: Partial<Record<MaterialType, MaterialItem<Player, LocationType>[]>>;
|
|
20
|
-
rule?: RuleStep<Player>;
|
|
20
|
+
rule?: RuleStep<Player, RuleId>;
|
|
21
21
|
memory: Record<keyof any, any>;
|
|
22
22
|
helpDisplay?: HelpDisplay<Player, MaterialType, LocationType>;
|
|
23
23
|
droppedItem?: DisplayedItem<MaterialType>;
|
|
24
|
-
tutorial?: TutorialState
|
|
24
|
+
tutorial?: TutorialState<Player, MaterialType, LocationType, RuleId>;
|
|
25
25
|
transientItems?: Partial<Record<MaterialType, number[]>>;
|
|
26
26
|
};
|
|
@@ -8,27 +8,27 @@ import { TutorialState } from './tutorial';
|
|
|
8
8
|
/**
|
|
9
9
|
* Helper class to implement {@link GameSetup} when using the {@link MaterialRules} approach.
|
|
10
10
|
*/
|
|
11
|
-
export declare abstract class MaterialGameSetup<P extends number = number, M extends number = number, L extends number = number, Options = any> implements GameSetup<MaterialGame<P, M, L>, Options> {
|
|
11
|
+
export declare abstract class MaterialGameSetup<P extends number = number, M extends number = number, L extends number = number, Options = any, R extends number = number> implements GameSetup<MaterialGame<P, M, L, R>, Options> {
|
|
12
12
|
/**
|
|
13
13
|
* The rules of the game
|
|
14
14
|
*/
|
|
15
|
-
abstract Rules: MaterialRulesCreator<P, M, L>;
|
|
15
|
+
abstract Rules: MaterialRulesCreator<P, M, L, R>;
|
|
16
16
|
/**
|
|
17
17
|
* The game setup state we are working on
|
|
18
18
|
* @protected
|
|
19
19
|
*/
|
|
20
|
-
protected game: MaterialGame<P, M, L>;
|
|
20
|
+
protected game: MaterialGame<P, M, L, R>;
|
|
21
21
|
/**
|
|
22
22
|
* Get an instance of the rules of the game
|
|
23
23
|
*/
|
|
24
|
-
get rules(): MaterialRules<P, M, L>;
|
|
24
|
+
get rules(): MaterialRules<P, M, L, R>;
|
|
25
25
|
/**
|
|
26
26
|
* Entry point for {@link GameSetup}
|
|
27
27
|
* @param options Options of the game
|
|
28
28
|
* @param tutorial Initial tutorial state if any
|
|
29
29
|
* @returns the initial state of the game
|
|
30
30
|
*/
|
|
31
|
-
setup(options: Options, tutorial?: TutorialState): MaterialGame<P, M, L>;
|
|
31
|
+
setup(options: Options, tutorial?: TutorialState<P, M, L, R>): MaterialGame<P, M, L, R>;
|
|
32
32
|
/**
|
|
33
33
|
* @returns array of the player ids (shortcut for this.game.players)
|
|
34
34
|
*/
|
|
@@ -48,7 +48,7 @@ export declare abstract class MaterialGameSetup<P extends number = number, M ext
|
|
|
48
48
|
* @param move The MaterialMove to play
|
|
49
49
|
* @protected
|
|
50
50
|
*/
|
|
51
|
-
protected playMove(move: MaterialMove<P, M, L>): void;
|
|
51
|
+
protected playMove(move: MaterialMove<P, M, L, R>): void;
|
|
52
52
|
/**
|
|
53
53
|
* Helper function to manipulate the items of the game. See {@link Material}.
|
|
54
54
|
* @param type The type of Material we want to work on
|
|
@@ -82,16 +82,16 @@ export declare abstract class MaterialGameSetup<P extends number = number, M ext
|
|
|
82
82
|
* @param id Rule id to start
|
|
83
83
|
* @param player Player that starts the game (default value: this.game.players[0])
|
|
84
84
|
*/
|
|
85
|
-
startPlayerTurn
|
|
85
|
+
startPlayerTurn(id: R, player?: P): void;
|
|
86
86
|
/**
|
|
87
87
|
* Helper function to play a {@link StartSimultaneousRule} move on the game setup state.
|
|
88
88
|
* @param id Rule id to start
|
|
89
89
|
* @param players Players that are active (all the players by default)
|
|
90
90
|
*/
|
|
91
|
-
startSimultaneousRule
|
|
91
|
+
startSimultaneousRule(id: R, players?: P[]): void;
|
|
92
92
|
/**
|
|
93
93
|
* Helper function to play a {@link StartRule} move on the game setup state.
|
|
94
94
|
* @param id Rule id to start
|
|
95
95
|
*/
|
|
96
|
-
startRule
|
|
96
|
+
startRule(id: R): void;
|
|
97
97
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialGameSetup.js","sourceRoot":"","sources":["../../src/material/MaterialGameSetup.ts"],"names":[],"mappings":";;;AACA,kCAA6D;AAC7D,iCAAkC;AAGlC,mCAAmD;AACnD,iCAA2D;AAG3D;;GAEG;AACH;IAAA;QAQE;;;WAGG;QACO,SAAI,
|
|
1
|
+
{"version":3,"file":"MaterialGameSetup.js","sourceRoot":"","sources":["../../src/material/MaterialGameSetup.ts"],"names":[],"mappings":";;;AACA,kCAA6D;AAC7D,iCAAkC;AAGlC,mCAAmD;AACnD,iCAA2D;AAG3D;;GAEG;AACH;IAAA;QAQE;;;WAGG;QACO,SAAI,GAA6B,EAAE,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;IAqHnF,CAAC;IAhHC,sBAAI,oCAAK;QAHT;;WAEG;aACH;YACE,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA;QAClC,CAAC;;;OAAA;IAED;;;;;OAKG;IACH,iCAAK,GAAL,UAAM,OAAgB,EAAE,QAAoC;QAC1D,IAAI,CAAC,IAAI,GAAG,EAAE,OAAO,EAAE,YAAY,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,QAAQ,UAAA,EAAE,CAAA;QAC/E,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;QAC3B,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,CAA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ACH,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { Material, MaterialMutator } from './items';
|
|
|
8
8
|
import { LocationStrategy } from './location';
|
|
9
9
|
import { MaterialGame } from './MaterialGame';
|
|
10
10
|
import { GameMemory, PlayerMemory } from './memory';
|
|
11
|
-
import { MaterialMove, MaterialMoveRandomized, MaterialMoveView, RollItem } from './moves';
|
|
11
|
+
import { CustomMove, ItemMove, ItemMoveRandomized, ItemMoveView, MaterialMove, MaterialMoveRandomized, MaterialMoveView, RollItem } from './moves';
|
|
12
12
|
import { MaterialRulesPart, MaterialRulesPartCreator } from './rules';
|
|
13
13
|
/**
|
|
14
14
|
* The MaterialRules class is the main class to implement the rules of a board game with the "Material oriented" approach.
|
|
@@ -21,14 +21,14 @@ import { MaterialRulesPart, MaterialRulesPartCreator } from './rules';
|
|
|
21
21
|
* @typeparam MaterialType - Numeric enum of the types of material manipulated in the game
|
|
22
22
|
* @typeparam LocationType - Numeric enum of the types of location in the game where the material can be located
|
|
23
23
|
*/
|
|
24
|
-
export declare abstract class MaterialRules<Player extends number = number, MaterialType extends number = number, LocationType extends number = number> extends Rules<MaterialGame<Player, MaterialType, LocationType>, MaterialMove<Player, MaterialType, LocationType>, Player> implements RandomMove<MaterialMove<Player, MaterialType, LocationType>, MaterialMoveRandomized<Player, MaterialType, LocationType>, Player>, Undo<MaterialGame<Player, MaterialType, LocationType>, MaterialMove<Player, MaterialType, LocationType>, Player>, UnpredictableMoves<MaterialMove<Player, MaterialType, LocationType>>, TimeLimit<MaterialGame<Player, MaterialType, LocationType>, MaterialMove<Player, MaterialType, LocationType>, Player> {
|
|
24
|
+
export declare abstract class MaterialRules<Player extends number = number, MaterialType extends number = number, LocationType extends number = number, RuleId extends number = number> extends Rules<MaterialGame<Player, MaterialType, LocationType, RuleId>, MaterialMove<Player, MaterialType, LocationType, RuleId>, Player> implements RandomMove<MaterialMove<Player, MaterialType, LocationType, RuleId>, MaterialMoveRandomized<Player, MaterialType, LocationType, RuleId>, Player>, Undo<MaterialGame<Player, MaterialType, LocationType, RuleId>, MaterialMove<Player, MaterialType, LocationType, RuleId>, Player>, UnpredictableMoves<MaterialMove<Player, MaterialType, LocationType, RuleId>>, TimeLimit<MaterialGame<Player, MaterialType, LocationType, RuleId>, MaterialMove<Player, MaterialType, LocationType, RuleId>, Player> {
|
|
25
25
|
/**
|
|
26
26
|
* When you implement a game using the "material" approach, you are also strongly advised to split the rules of the game into many small parts.
|
|
27
27
|
* You should usually create a numeric enum class "RuleId" that will list all those small parts.
|
|
28
28
|
* This "rules" property must be implemented to map each "rule id" with the corresponding MaterialRulesPart class.
|
|
29
29
|
* This way, the behavior of the rules can be delegated to the corresponding rule part at each step of the game.
|
|
30
30
|
*/
|
|
31
|
-
abstract readonly rules: Record<
|
|
31
|
+
abstract readonly rules: Record<RuleId, MaterialRulesPartCreator<Player, MaterialType, LocationType, RuleId>>;
|
|
32
32
|
/**
|
|
33
33
|
* The "location strategies" are global rules that always apply in a game when we want to maintain a consistency in the position of the material.
|
|
34
34
|
* For example, we usually want the cards in a player hand to always go from x=0 to x=n without a gap, so we use a {@link PositiveSequenceStrategy} to enforce
|
|
@@ -71,7 +71,7 @@ export declare abstract class MaterialRules<Player extends number = number, Mate
|
|
|
71
71
|
*
|
|
72
72
|
* @returns the class that handled the rules of the game, at current specific game state.
|
|
73
73
|
*/
|
|
74
|
-
get rulesStep(): MaterialRulesPart<Player, MaterialType, LocationType> | undefined;
|
|
74
|
+
get rulesStep(): MaterialRulesPart<Player, MaterialType, LocationType, RuleId> | undefined;
|
|
75
75
|
/**
|
|
76
76
|
* Returns a utility class to change the state of the items.
|
|
77
77
|
* Used by the framework to apply the Material moves on the items (should not be manipulated directly in the games).
|
|
@@ -92,13 +92,13 @@ export declare abstract class MaterialRules<Player extends number = number, Mate
|
|
|
92
92
|
/**
|
|
93
93
|
* In the material approach, the rules behavior is delegated to the current {@link rulesStep}. See {@link Rules.delegate}
|
|
94
94
|
*/
|
|
95
|
-
delegate(): Rules<MaterialGame<Player, MaterialType, LocationType>, MaterialMove<Player, MaterialType, LocationType>, Player> | undefined;
|
|
95
|
+
delegate(): Rules<MaterialGame<Player, MaterialType, LocationType, RuleId>, MaterialMove<Player, MaterialType, LocationType, RuleId>, Player> | undefined;
|
|
96
96
|
/**
|
|
97
97
|
* Randomize Shuffle of Roll moves (see {@link RandomMove.randomize})
|
|
98
98
|
* @param move The Material Move to randomize
|
|
99
99
|
* @returns the randomized move
|
|
100
100
|
*/
|
|
101
|
-
randomize(move: MaterialMove<Player, MaterialType, LocationType>): MaterialMove<Player, MaterialType, LocationType> & MaterialMoveRandomized<Player, MaterialType, LocationType>;
|
|
101
|
+
randomize(move: MaterialMove<Player, MaterialType, LocationType, RuleId>): MaterialMove<Player, MaterialType, LocationType, RuleId> & MaterialMoveRandomized<Player, MaterialType, LocationType, RuleId>;
|
|
102
102
|
/**
|
|
103
103
|
* When a RollItem move is create, it has to be randomized on the server side before it is saved and shared.
|
|
104
104
|
* This function provides the random value. By default, it returns a value between 0 and 5 assuming a 6 sided dice is rolled.
|
|
@@ -115,7 +115,12 @@ export declare abstract class MaterialRules<Player extends number = number, Mate
|
|
|
115
115
|
* @param context Context in which the move was played
|
|
116
116
|
* @returns Consequences of the move
|
|
117
117
|
*/
|
|
118
|
-
play(move: MaterialMoveRandomized<Player, MaterialType, LocationType> | MaterialMoveView<Player, MaterialType, LocationType>, context?: PlayMoveContext): MaterialMove<Player, MaterialType, LocationType>[];
|
|
118
|
+
play(move: MaterialMoveRandomized<Player, MaterialType, LocationType, RuleId> | MaterialMoveView<Player, MaterialType, LocationType, RuleId>, context?: PlayMoveContext): MaterialMove<Player, MaterialType, LocationType, RuleId>[];
|
|
119
|
+
protected onPlayItemMove(move: ItemMoveRandomized<Player, MaterialType, LocationType> | ItemMoveView<Player, MaterialType, LocationType>, context?: PlayMoveContext): MaterialMove<Player, MaterialType, LocationType, RuleId>[];
|
|
120
|
+
protected beforeItemMove(_move: ItemMove<Player, MaterialType, LocationType>, _context?: PlayMoveContext): MaterialMove<Player, MaterialType, LocationType, RuleId>[];
|
|
121
|
+
protected afterItemMove(_move: ItemMove<Player, MaterialType, LocationType>, _context?: PlayMoveContext): MaterialMove<Player, MaterialType, LocationType, RuleId>[];
|
|
122
|
+
protected onCustomMove(_move: CustomMove, _context?: PlayMoveContext): MaterialMove<Player, MaterialType, LocationType, RuleId>[];
|
|
123
|
+
private onPlayRulesMove;
|
|
119
124
|
private changeRule;
|
|
120
125
|
/**
|
|
121
126
|
* By default, a Material Move can be undone if no player became active and no dice was rolled.
|
|
@@ -125,7 +130,7 @@ export declare abstract class MaterialRules<Player extends number = number, Mate
|
|
|
125
130
|
* @param consecutiveActions Action played in between
|
|
126
131
|
* @returns true if the action can be undone by the player that played it
|
|
127
132
|
*/
|
|
128
|
-
canUndo(action: Action<MaterialMove<Player, MaterialType, LocationType>, Player>, consecutiveActions: Action<MaterialMove<Player, MaterialType, LocationType>, Player>[]): boolean;
|
|
133
|
+
canUndo(action: Action<MaterialMove<Player, MaterialType, LocationType, RuleId>, Player>, consecutiveActions: Action<MaterialMove<Player, MaterialType, LocationType, RuleId>, Player>[]): boolean;
|
|
129
134
|
private consecutiveActionBlocksUndo;
|
|
130
135
|
private actionBlocksUndo;
|
|
131
136
|
private actionActivatesPlayer;
|
|
@@ -137,12 +142,12 @@ export declare abstract class MaterialRules<Player extends number = number, Mate
|
|
|
137
142
|
* @param move The move to consider
|
|
138
143
|
* @returns true if the move blocks the undo
|
|
139
144
|
*/
|
|
140
|
-
protected moveBlocksUndo(move: MaterialMove<Player, MaterialType, LocationType>): boolean;
|
|
145
|
+
protected moveBlocksUndo(move: MaterialMove<Player, MaterialType, LocationType, RuleId>): boolean;
|
|
141
146
|
private moveActivatesPlayer;
|
|
142
147
|
/**
|
|
143
148
|
* Restore help display & local item moves
|
|
144
149
|
*/
|
|
145
|
-
restoreTransientState(previousState: MaterialGame<Player, MaterialType, LocationType>): void;
|
|
150
|
+
restoreTransientState(previousState: MaterialGame<Player, MaterialType, LocationType, RuleId>): void;
|
|
146
151
|
/**
|
|
147
152
|
* Random moves, or moves that reveals something to me, are unpredictable.
|
|
148
153
|
* Unpredictable moves cannot be precomputed on client side, the server side's response is necessary.
|
|
@@ -152,7 +157,7 @@ export declare abstract class MaterialRules<Player extends number = number, Mate
|
|
|
152
157
|
* @param _player The player playing the move
|
|
153
158
|
* @returns true if the move outcome cannot be predicted on client side
|
|
154
159
|
*/
|
|
155
|
-
isUnpredictableMove(move: MaterialMove<Player, MaterialType, LocationType>, _player: Player): boolean;
|
|
160
|
+
isUnpredictableMove(move: MaterialMove<Player, MaterialType, LocationType, RuleId>, _player: Player): boolean;
|
|
156
161
|
/**
|
|
157
162
|
* A Material Game is over when there is no rule left to execute. This state results of a {@link EndGame} move.
|
|
158
163
|
*
|
|
@@ -169,8 +174,8 @@ export declare abstract class MaterialRules<Player extends number = number, Mate
|
|
|
169
174
|
/**
|
|
170
175
|
* Signature interface of the constructor of a class that implements MaterialRules
|
|
171
176
|
*/
|
|
172
|
-
export interface MaterialRulesCreator<P extends number = number, M extends number = number, L extends number = number> {
|
|
173
|
-
new (state: MaterialGame<P, M, L>, client?: {
|
|
177
|
+
export interface MaterialRulesCreator<P extends number = number, M extends number = number, L extends number = number, R extends number = number> {
|
|
178
|
+
new (state: MaterialGame<P, M, L, R>, client?: {
|
|
174
179
|
player?: P;
|
|
175
|
-
}): MaterialRules<P, M, L>;
|
|
180
|
+
}): MaterialRules<P, M, L, R>;
|
|
176
181
|
}
|
|
@@ -187,55 +187,17 @@ var MaterialRules = /** @class */ (function (_super) {
|
|
|
187
187
|
* @returns Consequences of the move
|
|
188
188
|
*/
|
|
189
189
|
MaterialRules.prototype.play = function (move, context) {
|
|
190
|
-
var _a, _b;
|
|
191
190
|
var consequences = [];
|
|
192
191
|
var rulesStep = this.rulesStep;
|
|
193
192
|
switch (move.kind) {
|
|
194
193
|
case moves_1.MoveKind.ItemMove:
|
|
195
|
-
|
|
196
|
-
consequences.push.apply(consequences, rulesStep.beforeItemMove(move, context));
|
|
197
|
-
}
|
|
198
|
-
if (!this.game.items[move.itemType])
|
|
199
|
-
this.game.items[move.itemType] = [];
|
|
200
|
-
var mutator = this.mutator(move.itemType);
|
|
201
|
-
mutator.applyMove(move);
|
|
202
|
-
if (this.game.droppedItem && ((0, moves_1.isMoveItem)(move) || (0, moves_1.isDeleteItem)(move))
|
|
203
|
-
&& this.game.droppedItem.type === move.itemType && move.itemIndex === this.game.droppedItem.index) {
|
|
204
|
-
delete this.game.droppedItem;
|
|
205
|
-
}
|
|
206
|
-
var indexes = getItemMoveIndexes(move);
|
|
207
|
-
if (context === null || context === void 0 ? void 0 : context.transient) {
|
|
208
|
-
if (!this.game.transientItems)
|
|
209
|
-
this.game.transientItems = {};
|
|
210
|
-
this.game.transientItems[move.itemType] = (0, union_1.default)(this.game.transientItems[move.itemType], indexes);
|
|
211
|
-
}
|
|
212
|
-
else if (this.game.transientItems) {
|
|
213
|
-
this.game.transientItems[move.itemType] = (0, difference_1.default)(this.game.transientItems[move.itemType], indexes);
|
|
214
|
-
}
|
|
215
|
-
if (rulesStep && !(context === null || context === void 0 ? void 0 : context.transient)) {
|
|
216
|
-
consequences.push.apply(consequences, rulesStep.afterItemMove(move, context));
|
|
217
|
-
}
|
|
194
|
+
consequences.push.apply(consequences, this.onPlayItemMove(move, context));
|
|
218
195
|
break;
|
|
219
196
|
case moves_1.MoveKind.RulesMove:
|
|
220
|
-
|
|
221
|
-
if ((_b = (_a = this.game.rule) === null || _a === void 0 ? void 0 : _a.players) === null || _b === void 0 ? void 0 : _b.includes(move.player)) {
|
|
222
|
-
this.game.rule.players = this.game.rule.players.filter(function (player) { return player !== move.player; });
|
|
223
|
-
if ((0, rules_1.isSimultaneousRule)(rulesStep)) {
|
|
224
|
-
consequences.push.apply(consequences, rulesStep.onPlayerTurnEnd(move, context));
|
|
225
|
-
if (this.game.rule.players.length === 0) {
|
|
226
|
-
consequences.push.apply(consequences, rulesStep.getMovesAfterPlayersDone());
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
else {
|
|
231
|
-
console.warn('EndPlayerTurn was triggered for a player which is already inactive');
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
else {
|
|
235
|
-
consequences.push.apply(consequences, this.changeRule(move, context));
|
|
236
|
-
}
|
|
197
|
+
consequences.push.apply(consequences, this.onPlayRulesMove(move, context));
|
|
237
198
|
break;
|
|
238
199
|
case moves_1.MoveKind.CustomMove:
|
|
200
|
+
consequences.push.apply(consequences, this.onCustomMove(move, context));
|
|
239
201
|
if (rulesStep) {
|
|
240
202
|
consequences.push.apply(consequences, rulesStep.onCustomMove(move, context));
|
|
241
203
|
}
|
|
@@ -263,6 +225,68 @@ var MaterialRules = /** @class */ (function (_super) {
|
|
|
263
225
|
}
|
|
264
226
|
return consequences;
|
|
265
227
|
};
|
|
228
|
+
MaterialRules.prototype.onPlayItemMove = function (move, context) {
|
|
229
|
+
var consequences = [];
|
|
230
|
+
var rulesStep = this.rulesStep;
|
|
231
|
+
consequences.push.apply(consequences, this.beforeItemMove(move, context));
|
|
232
|
+
if (rulesStep && !(context === null || context === void 0 ? void 0 : context.transient)) {
|
|
233
|
+
consequences.push.apply(consequences, rulesStep.beforeItemMove(move, context));
|
|
234
|
+
}
|
|
235
|
+
if (!this.game.items[move.itemType])
|
|
236
|
+
this.game.items[move.itemType] = [];
|
|
237
|
+
var mutator = this.mutator(move.itemType);
|
|
238
|
+
mutator.applyMove(move);
|
|
239
|
+
if (this.game.droppedItem && ((0, moves_1.isMoveItem)(move) || (0, moves_1.isDeleteItem)(move))
|
|
240
|
+
&& this.game.droppedItem.type === move.itemType && move.itemIndex === this.game.droppedItem.index) {
|
|
241
|
+
delete this.game.droppedItem;
|
|
242
|
+
}
|
|
243
|
+
var indexes = getItemMoveIndexes(move);
|
|
244
|
+
if (context === null || context === void 0 ? void 0 : context.transient) {
|
|
245
|
+
if (!this.game.transientItems)
|
|
246
|
+
this.game.transientItems = {};
|
|
247
|
+
this.game.transientItems[move.itemType] = (0, union_1.default)(this.game.transientItems[move.itemType], indexes);
|
|
248
|
+
}
|
|
249
|
+
else if (this.game.transientItems) {
|
|
250
|
+
this.game.transientItems[move.itemType] = (0, difference_1.default)(this.game.transientItems[move.itemType], indexes);
|
|
251
|
+
}
|
|
252
|
+
consequences.push.apply(consequences, this.afterItemMove(move, context));
|
|
253
|
+
if (rulesStep && !(context === null || context === void 0 ? void 0 : context.transient)) {
|
|
254
|
+
consequences.push.apply(consequences, rulesStep.afterItemMove(move, context));
|
|
255
|
+
}
|
|
256
|
+
return consequences;
|
|
257
|
+
};
|
|
258
|
+
MaterialRules.prototype.beforeItemMove = function (_move, _context) {
|
|
259
|
+
return [];
|
|
260
|
+
};
|
|
261
|
+
MaterialRules.prototype.afterItemMove = function (_move, _context) {
|
|
262
|
+
return [];
|
|
263
|
+
};
|
|
264
|
+
MaterialRules.prototype.onCustomMove = function (_move, _context) {
|
|
265
|
+
return [];
|
|
266
|
+
};
|
|
267
|
+
MaterialRules.prototype.onPlayRulesMove = function (move, context) {
|
|
268
|
+
var _a, _b;
|
|
269
|
+
var consequences = [];
|
|
270
|
+
var rulesStep = this.rulesStep;
|
|
271
|
+
if (move.type === moves_1.RuleMoveType.EndPlayerTurn) {
|
|
272
|
+
if ((_b = (_a = this.game.rule) === null || _a === void 0 ? void 0 : _a.players) === null || _b === void 0 ? void 0 : _b.includes(move.player)) {
|
|
273
|
+
this.game.rule.players = this.game.rule.players.filter(function (player) { return player !== move.player; });
|
|
274
|
+
if ((0, rules_1.isSimultaneousRule)(rulesStep)) {
|
|
275
|
+
consequences.push.apply(consequences, rulesStep.onPlayerTurnEnd(move, context));
|
|
276
|
+
if (this.game.rule.players.length === 0) {
|
|
277
|
+
consequences.push.apply(consequences, rulesStep.getMovesAfterPlayersDone());
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
console.warn('EndPlayerTurn was triggered for a player which is already inactive');
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
else {
|
|
286
|
+
consequences.push.apply(consequences, this.changeRule(move, context));
|
|
287
|
+
}
|
|
288
|
+
return consequences;
|
|
289
|
+
};
|
|
266
290
|
MaterialRules.prototype.changeRule = function (move, context) {
|
|
267
291
|
var _a, _b, _c, _d, _e, _f;
|
|
268
292
|
var moves = (_b = (_a = this.rulesStep) === null || _a === void 0 ? void 0 : _a.onRuleEnd(move, context)) !== null && _b !== void 0 ? _b : [];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialRules.js","sourceRoot":"","sources":["../../src/material/MaterialRules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iEAA0C;AAC1C,yDAAkC;AAClC,2DAAoC;AACpC,uDAAgC;AAGhC,kCAAiD;AACjD,0CAAsD;AAGtD,iCAAmD;AAGnD,mCAAmD;AACnD,iCAmBgB;AAChB,iCAAyF;AAEzF;;;;;;;;;;GAUG;AACH;IACU,iCAAiH;IAD3H;;QAeE;;;;;WAKG;QACM,yBAAmB,GAAuH,EAAE,CAAA;;IAwUvJ,CAAC;IAtUC;;;;;OAKG;IACH,gCAAQ,GAAR,UAAS,IAAkB;QACzB,OAAO,IAAI,gBAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAA;IAClD,CAAC;IAMD,sBAAI,kCAAO;QAJX;;;WAGG;aACH;YACE,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,CAAA;QAC1B,CAAC;;;OAAA;IAED;;;;;;;OAOG;IACO,iCAAS,GAAnB,UAAoB,MAAe;QACjC,OAAO,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,mBAAU,CAAS,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,qBAAY,CAAS,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,CA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AAS,kBAAkB,CAAC,IAAc;IACxC,QAAQ,IAAI,CAAC,IAAI,EAAE,CAAC;QAClB,KAAK,oBAAY,CAAC,IAAI,CAAC;QACvB,KAAK,oBAAY,CAAC,MAAM,CAAC;QACzB,KAAK,oBAAY,CAAC,IAAI,CAAC;QACvB,KAAK,oBAAY,CAAC,MAAM;YACtB,OAAO,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;QACzB,KAAK,oBAAY,CAAC,UAAU,CAAC;QAC7B,KAAK,oBAAY,CAAC,YAAY,CAAC;QAC/B,KAAK,oBAAY,CAAC,OAAO;YACvB,OAAO,IAAI,CAAC,OAAO,CAAA;QACrB;YACE,OAAO,EAAE,CAAA;IACb,CAAC;AACH,CAAC"}
|
|
@@ -8,7 +8,7 @@ import { MaterialMove, MaterialMoveRandomized } from './moves';
|
|
|
8
8
|
* Using some {@link HidingSecretsStrategy} allows to enforce the security of a game with secret information easily.
|
|
9
9
|
* If the game has only hidden information (all players have the same information), then you must implement {@link HiddenMaterialRules} instead.
|
|
10
10
|
*/
|
|
11
|
-
export declare abstract class SecretMaterialRules<Player extends number = number, MaterialType extends number = number, LocationType extends number = number> extends HiddenMaterialRules<Player, MaterialType, LocationType> implements SecretInformation<MaterialGame, MaterialMove<Player, MaterialType, LocationType>, MaterialMove<Player, MaterialType, LocationType>, Player> {
|
|
11
|
+
export declare abstract class SecretMaterialRules<Player extends number = number, MaterialType extends number = number, LocationType extends number = number, RuleId extends number = number> extends HiddenMaterialRules<Player, MaterialType, LocationType, RuleId> implements SecretInformation<MaterialGame<Player, MaterialType, LocationType, RuleId>, MaterialMove<Player, MaterialType, LocationType, RuleId>, MaterialMove<Player, MaterialType, LocationType, RuleId>, Player> {
|
|
12
12
|
/**
|
|
13
13
|
* Link {@link HiddenMaterialRules.hidingStrategies}, but with knowledge of whom the item should be hidden from.
|
|
14
14
|
* See {@link HidingSecretsStrategy}
|
|
@@ -17,11 +17,11 @@ export declare abstract class SecretMaterialRules<Player extends number = number
|
|
|
17
17
|
/**
|
|
18
18
|
* With the material approach, we can offer a default working implementation for {@link SecretInformation.getPlayerView}
|
|
19
19
|
*/
|
|
20
|
-
getPlayerView(player: Player): MaterialGame<Player, MaterialType, LocationType>;
|
|
20
|
+
getPlayerView(player: Player): MaterialGame<Player, MaterialType, LocationType, RuleId>;
|
|
21
21
|
/**
|
|
22
22
|
* With the material approach, we can offer a default working implementation for {@link SecretInformation.getPlayerMoveView}
|
|
23
23
|
*/
|
|
24
|
-
getPlayerMoveView(move: MaterialMoveRandomized<Player, MaterialType, LocationType>, player: Player): MaterialMove<Player, MaterialType, LocationType>;
|
|
24
|
+
getPlayerMoveView(move: MaterialMoveRandomized<Player, MaterialType, LocationType, RuleId>, player: Player): MaterialMove<Player, MaterialType, LocationType, RuleId>;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
27
|
* A Hiding Strategy is a function that takes an item and a player and returns a list of path to hide in the item object.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecretMaterialRules.js","sourceRoot":"","sources":["../../src/material/SecretMaterialRules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,6DAA2E;AAK3E;;;;GAIG;AACH;IACU,
|
|
1
|
+
{"version":3,"file":"SecretMaterialRules.js","sourceRoot":"","sources":["../../src/material/SecretMaterialRules.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AACA,6DAA2E;AAK3E;;;;GAIG;AACH;IACU,uCAA+D;IADzE;;IAuBA,CAAC;IAbC;;OAEG;IACH,2CAAa,GAAb,UAAc,MAAc;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAA;IAC7B,CAAC;IAED;;OAEG;IACH,+CAAiB,GAAjB,UAAkB,IAAwE,EAAE,MAAc;QACxG,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,MAAM,CAAC,CAAA;IACvC,CAAC;IACH,0BAAC;AAAD,CAAC,AAvBD,CACU,yCAAmB,GAsB5B;AAvBqB,kDAAmB;AAgCzC;;;;;GAKG;AACI,IAAM,kBAAkB,GAAG,UAChC,IAAwB,EAAE,MAAU,IACvB,OAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,EAA7C,CAA6C,CAAA;AAF/C,QAAA,kBAAkB,sBAE6B;AAE5D;;;;GAIG;AACI,IAAM,iBAAiB,GAAmB,UAC/C,IAAwB,EAAE,MAAU,IACvB,OAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,EAAnD,CAAmD,CAAA;AAFrD,QAAA,iBAAiB,qBAEoC"}
|
|
@@ -103,7 +103,7 @@ export declare class Material<P extends number = number, M extends number = numb
|
|
|
103
103
|
* @param {function | number} arg Location type to keep, or predicate function to match the location of the items to keep
|
|
104
104
|
* @returns {this} New instance with only the items which locations match the argument
|
|
105
105
|
*/
|
|
106
|
-
location(arg: L | ((location: Location<P, L>) => boolean)): this;
|
|
106
|
+
location<Id = any, Rotation = any>(arg: L | ((location: Location<P, L, Id, Rotation>) => boolean)): this;
|
|
107
107
|
/**
|
|
108
108
|
* Filters the items based on their rotation (item.location.rotation)
|
|
109
109
|
*
|
|
@@ -218,7 +218,7 @@ export declare class Material<P extends number = number, M extends number = numb
|
|
|
218
218
|
* @param {number | undefined} quantity Optional: for items with a quantity, the number of items to move. If undefined, the item is completely moved.
|
|
219
219
|
* @returns {MoveItem} the move that will change the location of the item (or a part of its quantity) when executed
|
|
220
220
|
*/
|
|
221
|
-
moveItem(location: Location<P, L> | ((item: MaterialItem<P, L>) => Location<P, L>), quantity?: number): MoveItem<P, M, L>;
|
|
221
|
+
moveItem<Id = any, Rotation = any>(location: Location<P, L, Id, Rotation> | ((item: MaterialItem<P, L>) => Location<P, L, Id, Rotation>), quantity?: number): MoveItem<P, M, L>;
|
|
222
222
|
/**
|
|
223
223
|
* Prepare moves that will change the location of all the items in this material instance
|
|
224
224
|
*
|
|
@@ -226,14 +226,14 @@ export declare class Material<P extends number = number, M extends number = numb
|
|
|
226
226
|
* @param {number | undefined} quantity Optional: for items with a quantity, the number of items to move. If undefined, the items are completely moved.
|
|
227
227
|
* @returns {MoveItem[]} the moves that will change the location of the items (or a part of their quantity) when executed
|
|
228
228
|
*/
|
|
229
|
-
moveItems(location: Partial<Location<P, L>> | ((item: MaterialItem<P, L>, index: number) => Partial<Location<P, L>>), quantity?: number): MoveItem<P, M, L>[];
|
|
229
|
+
moveItems<Id = any, Rotation = any>(location: Partial<Location<P, L, Id, Rotation>> | ((item: MaterialItem<P, L>, index: number) => Partial<Location<P, L, Id, Rotation>>), quantity?: number): MoveItem<P, M, L>[];
|
|
230
230
|
/**
|
|
231
231
|
* Prepare one move that will change the location of all the items in this material instance
|
|
232
232
|
*
|
|
233
|
-
* @param {Location
|
|
233
|
+
* @param {Location} location The new location of the items. It can only be the same location for every item.
|
|
234
234
|
* @returns {MoveItemsAtOnce} the move that will change the location of the items when executed
|
|
235
235
|
*/
|
|
236
|
-
moveItemsAtOnce(location: Partial<Location<P, L>>): MoveItemsAtOnce<P, M, L>;
|
|
236
|
+
moveItemsAtOnce<Id = any, Rotation = any>(location: Partial<Location<P, L, Id, Rotation>>): MoveItemsAtOnce<P, M, L>;
|
|
237
237
|
/**
|
|
238
238
|
* Prepare a move that will select current first item in this material instance
|
|
239
239
|
*
|
|
@@ -92,7 +92,7 @@ var Material = /** @class */ (function () {
|
|
|
92
92
|
if (typeof arg === 'number') {
|
|
93
93
|
var entry = this.entries.find(function (entry) { return entry[0] === arg; });
|
|
94
94
|
if (!entry)
|
|
95
|
-
throw new Error("Could not find any item with index ".concat(arg));
|
|
95
|
+
throw new Error("Could not find any item with index ".concat(arg, " for type ").concat(this.type));
|
|
96
96
|
return entry[1];
|
|
97
97
|
}
|
|
98
98
|
else if (typeof arg === 'function') {
|
|
@@ -446,7 +446,7 @@ var Material = /** @class */ (function () {
|
|
|
446
446
|
/**
|
|
447
447
|
* Prepare one move that will change the location of all the items in this material instance
|
|
448
448
|
*
|
|
449
|
-
* @param {Location
|
|
449
|
+
* @param {Location} location The new location of the items. It can only be the same location for every item.
|
|
450
450
|
* @returns {MoveItemsAtOnce} the move that will change the location of the items when executed
|
|
451
451
|
*/
|
|
452
452
|
Material.prototype.moveItemsAtOnce = function (location) {
|