2020-01-14 17:27:56 +01:00
|
|
|
import Hanafuda;
|
|
|
|
import * as Dom from UnitJS.Dom;
|
|
|
|
|
2020-01-15 18:01:07 +01:00
|
|
|
return {
|
|
|
|
make: Card
|
|
|
|
};
|
|
|
|
|
2020-01-14 17:27:56 +01:00
|
|
|
function Card(name) {
|
2020-01-14 22:14:55 +01:00
|
|
|
var value = Hanafuda.Card[name];
|
|
|
|
return {
|
|
|
|
value: value,
|
2020-01-15 18:01:07 +01:00
|
|
|
dom: Dom.make('li', {
|
|
|
|
class: ["card", "value" + value.monthOffset, "month" + value.flower]
|
|
|
|
})
|
2020-01-14 22:14:55 +01:00
|
|
|
};
|
2020-01-14 17:27:56 +01:00
|
|
|
}
|