add inventory tutorial step

This commit is contained in:
Mashy
2019-10-23 08:26:15 +10:00
parent ec3a2a0ce5
commit 1ec43cd6b0
2 changed files with 12 additions and 12 deletions
+11 -1
View File
@@ -275,6 +275,16 @@ function Vbox(args) {
return <button disabled={!inventoryHighlight} class={inventoryHighlight ? 'receiving' : 'empty'} >&nbsp;</button>;
}
const tutorial = instance.time_control === 'Practice'
&& instance.rounds.length === 1
&& i === 0
&& combiner.length === 0
&& vboxSelected.length === 0
&& vbox.bits === 16
&& vbox.bound.length === 5
&& vbox.free[0].filter(c => c).length === 4
? 'combo-border' : null;
const combinerItems = combiner.map(j => vbox.bound[j]);
const combinerCount = countBy(combinerItems, co => co);
@@ -314,7 +324,7 @@ function Vbox(args) {
const highlighted = combiner.indexOf(i) > -1;
const border = buttons[removeTier(v)] ? buttons[removeTier(v)]() : '';
const classes = `${highlighted ? 'highlight' : border} ${comboHighlight}`;
const classes = `${highlighted ? 'highlight' : border} ${comboHighlight} ${tutorial}`;
if (shapes[v]) {
return (
<button