diff --git a/app/lib/icemake.ts b/app/lib/icemake.ts index 5d34187..dc0811d 100644 --- a/app/lib/icemake.ts +++ b/app/lib/icemake.ts @@ -72,9 +72,6 @@ function runGraphExecution( const visited: Map> = new Map(); let currentId: number | null = firstComponentId; - const coneColors: ConeColor[] = ["red", "yellow", "brown"]; - const flavors: Flavor[] = ["vanilla", "chocolate", "strawberry"]; - while (currentId !== null) { const component: Component | undefined = components[currentId]; const node: ComponentGraphNode | undefined = graph[currentId]; @@ -136,7 +133,11 @@ function runGraphExecution( branchTaken = condition; } - steps.push({ componentIndex: currentId, stack: [...stack], branchTaken }); + steps.push({ + componentIndex: currentId, + stack: stack === null ? null : [...stack], + branchTaken, + }); if (children == null) break; @@ -151,4 +152,4 @@ function runGraphExecution( } return steps; -} +} \ No newline at end of file diff --git a/app/routes/home.tsx b/app/routes/home.tsx index 86ba063..d802349 100644 --- a/app/routes/home.tsx +++ b/app/routes/home.tsx @@ -49,11 +49,11 @@ function renderIceCream(spec: IceCreamSpec, index: number) { } const iceCreams : IceCreamSpec[] = [ - { x: "24px", y: "calc(100% - 100px)", cone: "red", scoops: ["vanilla", "chocolate", "chocolate","strawberry", "strawberry"] }, + { x: "10%", y: "calc(100% - 100px)", cone: "red", scoops: ["vanilla", "chocolate", "chocolate","strawberry", "strawberry"] }, { x: "25%", y: "calc(100% - 100px)", cone: "brown", scoops: ["strawberry", "vanilla", "chocolate"] }, { x: "50%", y: "calc(100% - 100px)", cone: "yellow", scoops: ["chocolate"] }, { x: "75%", y: "calc(100% - 100px)", cone: "red", scoops: ["chocolate", "strawberry", "vanilla"] }, - { x: "calc(100% - 100px)", y: "calc(100% - 100px)", cone: "brown", scoops: ["strawberry", "strawberry", "chocolate", "vanilla", "strawberry"] }, + { x: "90%", y: "calc(100% - 100px)", cone: "brown", scoops: ["strawberry", "strawberry", "chocolate", "vanilla", "strawberry"] }, ]; export function meta({}: Route.MetaArgs) { diff --git a/app/routes/howToPlay.tsx b/app/routes/howToPlay.tsx index 59881cf..b6aff66 100644 --- a/app/routes/howToPlay.tsx +++ b/app/routes/howToPlay.tsx @@ -63,7 +63,7 @@ export default function HowToPlay() { このめんには、プレイにひつようなさまざまなじょうほうひょうされています。

- ひだりうえには、そのステージのミッション(つくりたいアイスクリーム)がかれています。 + ひだりうえには、そのステージの番号やミッション(つくりたいアイスクリーム)がかれています。 このミッションをたっせいできるよう、人々ひとびと上手じょうずはいしましょう。

@@ -80,6 +80,9 @@ export default function HowToPlay() {

めんしたには、このステージでぎょうしてくれるひとたちがならんでいます。 ぎょうさんさせたいひとがいたら、ドラッグ&ドロップできなしょはいできます。 + はいしたひとびとは、そのしたにあるベルトコンベアをべつひとやコーンとうにゅうぐちつなげることで、アイスクリームづくりを手伝てつだってくれます。 + ベルトコンベアのはしをクリックしたまま、べつのベルトコンベアのはしまでっていくことでつなげることができます。 + はいしたひとびとや、つなげた経路けいろはホバーして出てくる×ボタンですことができます。

ステージ画面の説明 @@ -95,6 +98,7 @@ export default function HowToPlay() {

みぎしたには「じっこう」ボタンがあります。 はいととのったとおもったら、このボタンをしてみましょう。すと、さまざまないろのコーンがながれてきます。 + スピードをえたいときは、実行じっこうボタンのとなりにあるボタンをすことにより、はやくしたりおそくしたりできます。

だいどおりのアイスをつくることができればせいこうです。 @@ -192,8 +196,7 @@ export default function HowToPlay() {

  • ・ Ⅰ:コーンのいろ
  • ・ Ⅱ:っているアイスのかず
  • -
  • ・ Ⅲ:いちばんうえっているアイスのしゅるい
  • -
  • ・ Ⅳ:とくていのアイスのならじゅん
  • +
  • ・ Ⅲ:とくていのアイスのならじゅん

それぞれのじょうけんしたがって、コーンをじょうどちらかのけいながします。 @@ -219,13 +222,9 @@ export default function HowToPlay() { このひとたちは、とくていあじのアイスがだいきです。 そのあじのアイスがいちばんうえったコーンがながれてくると、いちばんうえのアイスをべてしまいます。

-

ただし、

-
    -
  • ・ アイスが1つもっていない
  • -
  • いちばんうえのアイスがきなあじではない
  • -
-

- といったあいは、なにもしません。 +

ただし、 + いちばんうえのアイスがきなあじではないあいは、なにもしません。 + しかし、アイスが1つもっていないコーンがながれてきたときは、コーンをべてしまいます。

くろふくの人は、どんなあじだいきです! diff --git a/app/stages.ts b/app/stages.ts index c0f6078..9b11320 100644 --- a/app/stages.ts +++ b/app/stages.ts @@ -167,39 +167,9 @@ export const STAGES: Record = { }, 13: { mission: { - red: [ - "chocolate", - "vanilla", - "chocolate", - "vanilla", - "chocolate", - "vanilla", - "chocolate", - "vanilla", - "strawberry", - ], - yellow: [ - "vanilla", - "vanilla", - "vanilla", - "vanilla", - "vanilla", - "vanilla", - "vanilla", - "strawberry", - "strawberry", - ], - brown: [ - "vanilla", - "chocolate", - "vanilla", - "vanilla", - "chocolate", - "vanilla", - "vanilla", - "chocolate", - "vanilla", - ], + red: ["chocolate", "vanilla", "chocolate", "vanilla", "chocolate", "vanilla", "chocolate", "vanilla", "strawberry"], + yellow: ["vanilla", "vanilla", "vanilla", "vanilla", "vanilla", "vanilla", "vanilla", "strawberry", "strawberry"], + brown: ["vanilla", "chocolate", "vanilla", "vanilla", "chocolate", "vanilla", "vanilla", "chocolate", "vanilla",], }, components: [ { type: "if", condition: "red" }, @@ -342,98 +312,40 @@ export const STAGES: Record = { { type: "if", condition: 5 }, ], }, - 20: { +20: { mission: { - red: [ - "vanilla", - "strawberry", - "chocolate", - "vanilla", - "chocolate", - "strawberry", - "vanilla", - "chocolate", - "strawberry", - ], - yellow: [ - "chocolate", - "vanilla", - "strawberry", - "chocolate", - "strawberry", - "vanilla", - "chocolate", - "strawberry", - ], - brown: [ - "strawberry", - "chocolate", - "vanilla", - "chocolate", - "strawberry", - "vanilla", - "chocolate", - "strawberry", - ], + red: ["vanilla", "strawberry", "chocolate", "vanilla", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry"], + yellow: ["chocolate", "vanilla", "strawberry", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry"], + brown: ["strawberry", "chocolate", "vanilla", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry"], }, components: [ - { type: "push", flavor: "vanilla" }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "strawberry" }, - { type: "if", condition: "red" }, - { type: "if", condition: "yellow" }, - { type: "if", condition: 3 }, - { type: "if", condition: 4 }, - { type: "if", condition: 5 }, - { type: "if", condition: 8 }, - ], + {type: "push", flavor: "vanilla"}, + {type: "push", flavor: "chocolate"}, + {type: "push", flavor: "strawberry"}, + {type: "if", condition: "red"}, + {type: "if", condition: "yellow"}, + {type: "if", condition: 3}, + {type: "if", condition: 4}, + {type: "if", condition: 5}, + {type: "if", condition: 8}, + ] }, 21: { mission: { - red: [ - "vanilla", - "chocolate", - "strawberry", - "vanilla", - "chocolate", - "strawberry", - "chocolate", - "vanilla", - ], - yellow: [ - "strawberry", - "vanilla", - "chocolate", - "strawberry", - "chocolate", - "vanilla", - "strawberry", - "chocolate", - "vanilla", - ], - brown: [ - "vanilla", - "strawberry", - "vanilla", - "chocolate", - "strawberry", - "chocolate", - "vanilla", - "strawberry", - "chocolate", - "vanilla", - ], + red: ["vanilla", "chocolate", "strawberry", "vanilla", "chocolate", "strawberry", "chocolate", "vanilla"], + yellow: ["strawberry", "vanilla", "chocolate", "strawberry", "chocolate", "vanilla", "strawberry", "chocolate", "vanilla"], + brown: ["vanilla", "strawberry", "vanilla", "chocolate", "strawberry", "chocolate", "vanilla", "strawberry", "chocolate", "vanilla"], }, components: [ - { type: "push", flavor: "vanilla" }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "vanilla" }, - { type: "push", flavor: "chocolate" }, - { type: "push", flavor: "strawberry" }, - { type: "if", condition: "red" }, - { type: "if", condition: "yellow" }, - { type: "if", condition: 4 }, - { type: "if", condition: 8 }, - ], + {type: "push", flavor: "vanilla"}, + {type: "push", flavor: "chocolate"}, + {type: "push", flavor: "vanilla"}, + {type: "push", flavor: "chocolate"}, + {type: "push", flavor: "strawberry"}, + {type: "if", condition: "red"}, + {type: "if", condition: "yellow"}, + {type: "if", condition: 4}, + {type: "if", condition: 8}, + ] }, };