Published
Edited
Sep 2, 2022
Importers
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
import {melds} from "@maddievision/mahjong-algorithms-2"
Insert cell
MTiles = ({
allTiles,
melds,
replaceAka
})
Insert cell
replaceAka = (tid) => ({ "0p": "5p", "0m": "5m", "0s": "5s" }[tid] ?? tid)
Insert cell
Insert cell
MVector = ({
print: printVec2,
toString: vecToHandStr,
toArray: vecToArr,
fromString: handStrToVec,
fromArray: arrToVec,
order: vectorSlots,
isEmpty: isVecEmpty,
count: vecCount,
countOf: vecCountOf,
or: orVec,
and: andVec,
normalize: normVec,
subtract: subtractVec,
oneMinus: oneMinusVec,
})
Insert cell
Insert cell
import {orVec, vecCount,
vecCountOf} from "@maddievision/tenpai"
Insert cell
import { andVec, normVec, oneMinusVec, subtractVec, tryHand } from "@maddievision/starting-hands"
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
MData = ({
yakuList: yakuData,
yaku: yakuData.reduce(
(m, y) => ({
...m,
[y.name.toLocaleLowerCase().replace(" ", "")]: { ...y }
}),
{}
),
melds,
waitActions: allWaitActions,
allTiles,
printYaku
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
MAction = ({
possibleCalls,
possibleActions,
print: printActions
})
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more