microboard-temp 0.5.2 → 0.5.3
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/cjs/browser.js +10 -0
- package/dist/cjs/index.js +10 -0
- package/dist/cjs/node.js +10 -0
- package/dist/esm/browser.js +10 -0
- package/dist/esm/index.js +10 -0
- package/dist/esm/node.js +10 -0
- package/dist/types/Items/Examples/CardGame/Deck/Deck.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -48105,6 +48105,16 @@ class Deck extends BaseItem {
|
|
|
48105
48105
|
this.removeChildItems(this.index.list());
|
|
48106
48106
|
this.addChildItems(shuffled);
|
|
48107
48107
|
}
|
|
48108
|
+
flipDeck() {
|
|
48109
|
+
if (!this.index || !this.index.list().length) {
|
|
48110
|
+
return;
|
|
48111
|
+
}
|
|
48112
|
+
const cards = this.index.list();
|
|
48113
|
+
cards[0].toggleIsOpen(cards);
|
|
48114
|
+
const reversed = [...cards].reverse();
|
|
48115
|
+
this.removeChildItems(cards);
|
|
48116
|
+
this.addChildItems(reversed);
|
|
48117
|
+
}
|
|
48108
48118
|
apply(op) {
|
|
48109
48119
|
super.apply(op);
|
|
48110
48120
|
if (op.class === "Deck") {
|
package/dist/cjs/index.js
CHANGED
|
@@ -48105,6 +48105,16 @@ class Deck extends BaseItem {
|
|
|
48105
48105
|
this.removeChildItems(this.index.list());
|
|
48106
48106
|
this.addChildItems(shuffled);
|
|
48107
48107
|
}
|
|
48108
|
+
flipDeck() {
|
|
48109
|
+
if (!this.index || !this.index.list().length) {
|
|
48110
|
+
return;
|
|
48111
|
+
}
|
|
48112
|
+
const cards = this.index.list();
|
|
48113
|
+
cards[0].toggleIsOpen(cards);
|
|
48114
|
+
const reversed = [...cards].reverse();
|
|
48115
|
+
this.removeChildItems(cards);
|
|
48116
|
+
this.addChildItems(reversed);
|
|
48117
|
+
}
|
|
48108
48118
|
apply(op) {
|
|
48109
48119
|
super.apply(op);
|
|
48110
48120
|
if (op.class === "Deck") {
|
package/dist/cjs/node.js
CHANGED
|
@@ -50578,6 +50578,16 @@ class Deck extends BaseItem {
|
|
|
50578
50578
|
this.removeChildItems(this.index.list());
|
|
50579
50579
|
this.addChildItems(shuffled);
|
|
50580
50580
|
}
|
|
50581
|
+
flipDeck() {
|
|
50582
|
+
if (!this.index || !this.index.list().length) {
|
|
50583
|
+
return;
|
|
50584
|
+
}
|
|
50585
|
+
const cards = this.index.list();
|
|
50586
|
+
cards[0].toggleIsOpen(cards);
|
|
50587
|
+
const reversed = [...cards].reverse();
|
|
50588
|
+
this.removeChildItems(cards);
|
|
50589
|
+
this.addChildItems(reversed);
|
|
50590
|
+
}
|
|
50581
50591
|
apply(op) {
|
|
50582
50592
|
super.apply(op);
|
|
50583
50593
|
if (op.class === "Deck") {
|
package/dist/esm/browser.js
CHANGED
|
@@ -47951,6 +47951,16 @@ class Deck extends BaseItem {
|
|
|
47951
47951
|
this.removeChildItems(this.index.list());
|
|
47952
47952
|
this.addChildItems(shuffled);
|
|
47953
47953
|
}
|
|
47954
|
+
flipDeck() {
|
|
47955
|
+
if (!this.index || !this.index.list().length) {
|
|
47956
|
+
return;
|
|
47957
|
+
}
|
|
47958
|
+
const cards = this.index.list();
|
|
47959
|
+
cards[0].toggleIsOpen(cards);
|
|
47960
|
+
const reversed = [...cards].reverse();
|
|
47961
|
+
this.removeChildItems(cards);
|
|
47962
|
+
this.addChildItems(reversed);
|
|
47963
|
+
}
|
|
47954
47964
|
apply(op) {
|
|
47955
47965
|
super.apply(op);
|
|
47956
47966
|
if (op.class === "Deck") {
|
package/dist/esm/index.js
CHANGED
|
@@ -47944,6 +47944,16 @@ class Deck extends BaseItem {
|
|
|
47944
47944
|
this.removeChildItems(this.index.list());
|
|
47945
47945
|
this.addChildItems(shuffled);
|
|
47946
47946
|
}
|
|
47947
|
+
flipDeck() {
|
|
47948
|
+
if (!this.index || !this.index.list().length) {
|
|
47949
|
+
return;
|
|
47950
|
+
}
|
|
47951
|
+
const cards = this.index.list();
|
|
47952
|
+
cards[0].toggleIsOpen(cards);
|
|
47953
|
+
const reversed = [...cards].reverse();
|
|
47954
|
+
this.removeChildItems(cards);
|
|
47955
|
+
this.addChildItems(reversed);
|
|
47956
|
+
}
|
|
47947
47957
|
apply(op) {
|
|
47948
47958
|
super.apply(op);
|
|
47949
47959
|
if (op.class === "Deck") {
|
package/dist/esm/node.js
CHANGED
|
@@ -50412,6 +50412,16 @@ class Deck extends BaseItem {
|
|
|
50412
50412
|
this.removeChildItems(this.index.list());
|
|
50413
50413
|
this.addChildItems(shuffled);
|
|
50414
50414
|
}
|
|
50415
|
+
flipDeck() {
|
|
50416
|
+
if (!this.index || !this.index.list().length) {
|
|
50417
|
+
return;
|
|
50418
|
+
}
|
|
50419
|
+
const cards = this.index.list();
|
|
50420
|
+
cards[0].toggleIsOpen(cards);
|
|
50421
|
+
const reversed = [...cards].reverse();
|
|
50422
|
+
this.removeChildItems(cards);
|
|
50423
|
+
this.addChildItems(reversed);
|
|
50424
|
+
}
|
|
50415
50425
|
apply(op) {
|
|
50416
50426
|
super.apply(op);
|
|
50417
50427
|
if (op.class === "Deck") {
|
|
@@ -21,6 +21,7 @@ export declare class Deck extends BaseItem {
|
|
|
21
21
|
getBottomCard(): Card | undefined;
|
|
22
22
|
getRandomCard(): Card | undefined;
|
|
23
23
|
shuffleDeck(): void;
|
|
24
|
+
flipDeck(): void;
|
|
24
25
|
apply(op: DeckOperation): void;
|
|
25
26
|
updateMbr(): void;
|
|
26
27
|
deserialize(data: SerializedItemData): this;
|