Files
HexTrails/labs/inbound/levels.js
T

104 lines
3.6 KiB
JavaScript

import { hexagon } from '../../src/core.js';
const board = () => hexagon(2);
// Mouths are fixed. departDir is the heading whose reverse is the arrival.
// Parked heading is the opposite, so 调边 follows a different ray.
export const LEVELS = [
{
id: 'in-1', name: '口已经开了', standard: 1, dial: 0,
lesson: '这个口已经开了,点进来就停好。',
cells: board(),
stands: [{ id: 'cocoa', q: 1, r: -1, color: 8 }],
mouths: [{ id: 'cocoa-right', standId: 'cocoa', departDir: 2, tick: 0 }],
arrivals: [{ id: 'cocoa', color: 8, side: 1 }],
solution: [{ type: 'land', id: 'cocoa' }],
},
{
id: 'in-2', name: '转一下才通', standard: 2, dial: 0,
lesson: '我转这一格,是为了让缺口盖住这个口。',
cells: board(),
stands: [{ id: 'berry', q: 1, r: -1, color: 0 }],
mouths: [{ id: 'berry-up', standId: 'berry', departDir: 0, tick: 1 }],
arrivals: [{ id: 'berry', color: 0, side: 0 }],
solution: [{ type: 'confirm', dial: 1, steps: 1 }, { type: 'land', id: 'berry' }],
},
{
id: 'in-3', name: '一转两口', standard: 2, dial: 0,
lesson: '这一转打开了我的口,也关掉了对面。',
cells: board(),
stands: [{ id: 'cocoa', q: 0, r: 0, color: 8 }],
mouths: [
{ id: 'cocoa-right', standId: 'cocoa', departDir: 1, tick: 0 },
{ id: 'cocoa-left', standId: 'cocoa', departDir: 4, tick: 5 },
],
arrivals: [{ id: 'cocoa', color: 8, side: 4 }],
solution: [{ type: 'confirm', dial: 5, steps: 1 }, { type: 'land', id: 'cocoa' }],
},
{
id: 'in-4', name: '谁先停', standard: 2, dial: 0,
lesson: '先停那架会挡住另一架,所以要换顺序。',
cells: board(),
stands: [
{ id: 'cocoa', q: 0, r: -1, color: 8 },
{ id: 'berry', q: 1, r: -2, color: 0 },
],
mouths: [
{ id: 'cocoa-up', standId: 'cocoa', departDir: 1, tick: 0 },
{ id: 'berry-right', standId: 'berry', departDir: 2, tick: 0 },
],
arrivals: [
{ id: 'cocoa', color: 8, side: 0 },
{ id: 'berry', color: 0, side: 1 },
],
solution: [{ type: 'land', id: 'cocoa' }, { type: 'land', id: 'berry' }],
},
{
id: 'in-5', name: '两架各自进', standard: 3, dial: 0,
lesson: '我转是为了打开这两个口,但还是要一架一架点进来。',
cells: board(),
stands: [
{ id: 'berry', q: 1, r: -1, color: 0 },
{ id: 'cocoa', q: 0, r: 0, color: 8 },
],
mouths: [
{ id: 'berry-right', standId: 'berry', departDir: 2, tick: 1 },
{ id: 'cocoa-left', standId: 'cocoa', departDir: 4, tick: 1 },
],
arrivals: [
{ id: 'berry', color: 0, side: 1 },
{ id: 'cocoa', color: 8, side: 4 },
],
solution: [
{ type: 'confirm', dial: 1, steps: 1 },
{ type: 'land', id: 'berry' },
{ type: 'land', id: 'cocoa' },
],
},
{
id: 'in-6', name: '先停是为了换边', standard: 5, dial: 0,
lesson: '我先停是为了换到那条边,再转开口进来。',
cells: board(),
stands: [
{ id: 'berry', q: 1, r: -1, color: 0 },
{ id: 'cocoa', q: 0, r: -1, color: 8 },
],
mouths: [
{ id: 'berry-up', standId: 'berry', departDir: 0, tick: 0 },
{ id: 'berry-down', standId: 'berry', departDir: 3, tick: 1 },
{ id: 'cocoa-right', standId: 'cocoa', departDir: 2, tick: 1 },
],
arrivals: [
{ id: 'berry', color: 0, side: 0 },
{ id: 'cocoa', color: 8, side: 1 },
],
solution: [
{ type: 'land', id: 'berry' },
{ type: 'relocate', id: 'berry' },
{ type: 'confirm', dial: 1, steps: 1 },
{ type: 'land', id: 'cocoa' },
{ type: 'land', id: 'berry' },
],
},
];