JSFiddle - React, Tailwind, and code Playground
by evgkch
Babel + JSX
// f: X -> Y
// g: Y -> Z
const parse = fsmExp => {
fsmExp.match(/([\d\w]+):\s*([\d\w]+)\s*->\s*([\d\w]+))/gi);
};
class FSM {
static create(initialState, states, actions, cache, transitions){
}
constructor(states, actions, cache){
this.states = states;
this.actions = actions;
this.cache = cache;
this._registered = {};
}
}
class Tile {
create(n, m){
const tile = [];
for (let i = 0; i < n; i++)
for (let j = 0; j < m; j++)
tile.push(0);
return tile;
}
constructor(tile){
this.cache = {
tile: tile
};
}
}