Get the delve tour incrementer changes working and affecting fate as well
This commit is contained in:
parent
7639962130
commit
110823a26b
9 changed files with 174 additions and 14 deletions
|
|
@ -31,3 +31,21 @@ export function distanceBetweenFates(start, end) {
|
|||
};
|
||||
return 3;
|
||||
};
|
||||
|
||||
const fateOrder = [
|
||||
FatePath.WEST, // to make the .find not integer overflow
|
||||
FatePath.NORTH,
|
||||
FatePath.EAST,
|
||||
FatePath.SOUTH,
|
||||
FatePath.WEST,
|
||||
];
|
||||
|
||||
export function nextFate(fate) {
|
||||
const fateIndex = fateOrder.findIndex(f => f === fate);
|
||||
return fateOrder[fateIndex + 1];
|
||||
};
|
||||
|
||||
export function previousFate(fate) {
|
||||
const fateIndex = fateOrder.lastIndexOf(fate);
|
||||
return fateOrder[fateIndex - 1];
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue