diff --git a/priv/.gitignore b/priv/.gitignore index 79ba1e1..0fa227d 100644 --- a/priv/.gitignore +++ b/priv/.gitignore @@ -1,2 +1,4 @@ -index.html -elm-stuff +riichi.js +riichi.css +elm-stuff/ +node_modules/ diff --git a/priv/Makefile b/priv/Makefile index d313c3f..68750fa 100644 --- a/priv/Makefile +++ b/priv/Makefile @@ -1,7 +1,37 @@ -all: index.html +.PHONY: all node-deps clean run -index.html: - elm-make --yes src/Riichi.elm --output=index.html --warn +TARGET = js/riichi.js +SOURCE = src/Riichi.elm +CSS = css/riichi.css +CSS_SOURCE = src/Stylesheets.elm + +ELM_FILES = $(shell find . -type f -name '*.elm') +PATH := ./node_modules/.bin:$(PATH) + +ELMMAKE_FLAGS = --yes --warn + +ifeq ($(DEBUG),1) + ELMMAKE_FLAGS += --debug +endif + +all: node-deps $(TARGET) $(CSS) + +node-deps: + npm i + +$(TARGET): $(ELM_FILES) + elm-make $(ELMMAKE_FLAGS) src/Riichi.elm --output=$@ + +$(CSS): $(CSS_SOURCE) + elm-css $(CSS_SOURCE) -o css + +clean-deps: + rm -rf elm-stuff + rm -rf node_modules clean: - rm -rf elm-stuff index.html + rm -f $(TARGET) $(CSS) + rm -rf elm-stuff/build-artifacts + +run: all + elm-reactor diff --git a/priv/css/.gitignore b/priv/css/.gitignore new file mode 100644 index 0000000..375b16d --- /dev/null +++ b/priv/css/.gitignore @@ -0,0 +1 @@ +riichi.css \ No newline at end of file diff --git a/priv/elm-package.json b/priv/elm-package.json index 2467e86..7a894c1 100644 --- a/priv/elm-package.json +++ b/priv/elm-package.json @@ -8,8 +8,12 @@ ], "exposed-modules": [], "dependencies": { + "elm-community/list-extra": "6.1.0 <= v < 7.0.0", + "elm-community/maybe-extra": "4.0.0 <= v < 5.0.0", "elm-lang/core": "5.0.0 <= v < 6.0.0", - "elm-lang/html": "2.0.0 <= v < 3.0.0" + "elm-lang/html": "2.0.0 <= v < 3.0.0", + "rtfeldman/elm-css": "9.1.0 <= v < 10.0.0", + "rtfeldman/elm-css-helpers": "2.1.0 <= v < 3.0.0" }, "elm-version": "0.18.0 <= v < 0.19.0" } diff --git a/priv/images/Black/Back.png b/priv/images/Black/Back.png new file mode 100644 index 0000000..e7f4498 Binary files /dev/null and b/priv/images/Black/Back.png differ diff --git a/priv/images/Black/Blank.png b/priv/images/Black/Blank.png new file mode 100644 index 0000000..9ec3dc5 Binary files /dev/null and b/priv/images/Black/Blank.png differ diff --git a/priv/images/Black/Chun.png b/priv/images/Black/Chun.png new file mode 100644 index 0000000..29cc728 Binary files /dev/null and b/priv/images/Black/Chun.png differ diff --git a/priv/images/Black/Front.png b/priv/images/Black/Front.png new file mode 100644 index 0000000..e7f4498 Binary files /dev/null and b/priv/images/Black/Front.png differ diff --git a/priv/images/Black/Haku.png b/priv/images/Black/Haku.png new file mode 100644 index 0000000..14fc45b Binary files /dev/null and b/priv/images/Black/Haku.png differ diff --git a/priv/images/Black/Hatsu.png b/priv/images/Black/Hatsu.png new file mode 100644 index 0000000..eef3e16 Binary files /dev/null and b/priv/images/Black/Hatsu.png differ diff --git a/priv/images/Black/Man1.png b/priv/images/Black/Man1.png new file mode 100644 index 0000000..ed9e17e Binary files /dev/null and b/priv/images/Black/Man1.png differ diff --git a/priv/images/Black/Man2.png b/priv/images/Black/Man2.png new file mode 100644 index 0000000..495158a Binary files /dev/null and b/priv/images/Black/Man2.png differ diff --git a/priv/images/Black/Man3.png b/priv/images/Black/Man3.png new file mode 100644 index 0000000..d9e8ae4 Binary files /dev/null and b/priv/images/Black/Man3.png differ diff --git a/priv/images/Black/Man4.png b/priv/images/Black/Man4.png new file mode 100644 index 0000000..4684123 Binary files /dev/null and b/priv/images/Black/Man4.png differ diff --git a/priv/images/Black/Man5-Dora.png b/priv/images/Black/Man5-Dora.png new file mode 100644 index 0000000..ae1f296 Binary files /dev/null and b/priv/images/Black/Man5-Dora.png differ diff --git a/priv/images/Black/Man5.png b/priv/images/Black/Man5.png new file mode 100644 index 0000000..574808e Binary files /dev/null and b/priv/images/Black/Man5.png differ diff --git a/priv/images/Black/Man6.png b/priv/images/Black/Man6.png new file mode 100644 index 0000000..2367519 Binary files /dev/null and b/priv/images/Black/Man6.png differ diff --git a/priv/images/Black/Man7.png b/priv/images/Black/Man7.png new file mode 100644 index 0000000..d21bd2a Binary files /dev/null and b/priv/images/Black/Man7.png differ diff --git a/priv/images/Black/Man8.png b/priv/images/Black/Man8.png new file mode 100644 index 0000000..76b77fd Binary files /dev/null and b/priv/images/Black/Man8.png differ diff --git a/priv/images/Black/Man9.png b/priv/images/Black/Man9.png new file mode 100644 index 0000000..afd0a4a Binary files /dev/null and b/priv/images/Black/Man9.png differ diff --git a/priv/images/Black/Nan.png b/priv/images/Black/Nan.png new file mode 100644 index 0000000..e727897 Binary files /dev/null and b/priv/images/Black/Nan.png differ diff --git a/priv/images/Black/Pei.png b/priv/images/Black/Pei.png new file mode 100644 index 0000000..49e36d1 Binary files /dev/null and b/priv/images/Black/Pei.png differ diff --git a/priv/images/Black/Pin1.png b/priv/images/Black/Pin1.png new file mode 100644 index 0000000..3739041 Binary files /dev/null and b/priv/images/Black/Pin1.png differ diff --git a/priv/images/Black/Pin2.png b/priv/images/Black/Pin2.png new file mode 100644 index 0000000..4bf434f Binary files /dev/null and b/priv/images/Black/Pin2.png differ diff --git a/priv/images/Black/Pin3.png b/priv/images/Black/Pin3.png new file mode 100644 index 0000000..93d9b1c Binary files /dev/null and b/priv/images/Black/Pin3.png differ diff --git a/priv/images/Black/Pin4.png b/priv/images/Black/Pin4.png new file mode 100644 index 0000000..92bf010 Binary files /dev/null and b/priv/images/Black/Pin4.png differ diff --git a/priv/images/Black/Pin5-Dora.png b/priv/images/Black/Pin5-Dora.png new file mode 100644 index 0000000..aa63ac6 Binary files /dev/null and b/priv/images/Black/Pin5-Dora.png differ diff --git a/priv/images/Black/Pin5.png b/priv/images/Black/Pin5.png new file mode 100644 index 0000000..fd4cee8 Binary files /dev/null and b/priv/images/Black/Pin5.png differ diff --git a/priv/images/Black/Pin6.png b/priv/images/Black/Pin6.png new file mode 100644 index 0000000..3456e2e Binary files /dev/null and b/priv/images/Black/Pin6.png differ diff --git a/priv/images/Black/Pin7.png b/priv/images/Black/Pin7.png new file mode 100644 index 0000000..fd2fe27 Binary files /dev/null and b/priv/images/Black/Pin7.png differ diff --git a/priv/images/Black/Pin8.png b/priv/images/Black/Pin8.png new file mode 100644 index 0000000..ac1ff6c Binary files /dev/null and b/priv/images/Black/Pin8.png differ diff --git a/priv/images/Black/Pin9.png b/priv/images/Black/Pin9.png new file mode 100644 index 0000000..22eedf4 Binary files /dev/null and b/priv/images/Black/Pin9.png differ diff --git a/priv/images/Black/Shaa.png b/priv/images/Black/Shaa.png new file mode 100644 index 0000000..c6292fd Binary files /dev/null and b/priv/images/Black/Shaa.png differ diff --git a/priv/images/Black/Sou1.png b/priv/images/Black/Sou1.png new file mode 100644 index 0000000..49d7106 Binary files /dev/null and b/priv/images/Black/Sou1.png differ diff --git a/priv/images/Black/Sou2.png b/priv/images/Black/Sou2.png new file mode 100644 index 0000000..9155f5f Binary files /dev/null and b/priv/images/Black/Sou2.png differ diff --git a/priv/images/Black/Sou3.png b/priv/images/Black/Sou3.png new file mode 100644 index 0000000..d4115f5 Binary files /dev/null and b/priv/images/Black/Sou3.png differ diff --git a/priv/images/Black/Sou4.png b/priv/images/Black/Sou4.png new file mode 100644 index 0000000..9041701 Binary files /dev/null and b/priv/images/Black/Sou4.png differ diff --git a/priv/images/Black/Sou5-Dora.png b/priv/images/Black/Sou5-Dora.png new file mode 100644 index 0000000..3f4b336 Binary files /dev/null and b/priv/images/Black/Sou5-Dora.png differ diff --git a/priv/images/Black/Sou5.png b/priv/images/Black/Sou5.png new file mode 100644 index 0000000..a36f46d Binary files /dev/null and b/priv/images/Black/Sou5.png differ diff --git a/priv/images/Black/Sou6.png b/priv/images/Black/Sou6.png new file mode 100644 index 0000000..26dacd7 Binary files /dev/null and b/priv/images/Black/Sou6.png differ diff --git a/priv/images/Black/Sou7.png b/priv/images/Black/Sou7.png new file mode 100644 index 0000000..09417ce Binary files /dev/null and b/priv/images/Black/Sou7.png differ diff --git a/priv/images/Black/Sou8.png b/priv/images/Black/Sou8.png new file mode 100644 index 0000000..adbfa61 Binary files /dev/null and b/priv/images/Black/Sou8.png differ diff --git a/priv/images/Black/Sou9.png b/priv/images/Black/Sou9.png new file mode 100644 index 0000000..2d9800b Binary files /dev/null and b/priv/images/Black/Sou9.png differ diff --git a/priv/images/Black/Ton.png b/priv/images/Black/Ton.png new file mode 100644 index 0000000..dca6f8d Binary files /dev/null and b/priv/images/Black/Ton.png differ diff --git a/priv/images/White/Back.png b/priv/images/White/Back.png new file mode 100644 index 0000000..b7a1e2e Binary files /dev/null and b/priv/images/White/Back.png differ diff --git a/priv/images/White/Blank.png b/priv/images/White/Blank.png new file mode 100644 index 0000000..1f9160f Binary files /dev/null and b/priv/images/White/Blank.png differ diff --git a/priv/images/White/Chun.png b/priv/images/White/Chun.png new file mode 100644 index 0000000..b79b4c3 Binary files /dev/null and b/priv/images/White/Chun.png differ diff --git a/priv/images/White/Front.png b/priv/images/White/Front.png new file mode 100644 index 0000000..1734865 Binary files /dev/null and b/priv/images/White/Front.png differ diff --git a/priv/images/White/Haku.png b/priv/images/White/Haku.png new file mode 100644 index 0000000..14fc45b Binary files /dev/null and b/priv/images/White/Haku.png differ diff --git a/priv/images/White/Hatsu.png b/priv/images/White/Hatsu.png new file mode 100644 index 0000000..e9e2032 Binary files /dev/null and b/priv/images/White/Hatsu.png differ diff --git a/priv/images/White/Man1.png b/priv/images/White/Man1.png new file mode 100644 index 0000000..3b4c323 Binary files /dev/null and b/priv/images/White/Man1.png differ diff --git a/priv/images/White/Man2.png b/priv/images/White/Man2.png new file mode 100644 index 0000000..b589670 Binary files /dev/null and b/priv/images/White/Man2.png differ diff --git a/priv/images/White/Man3.png b/priv/images/White/Man3.png new file mode 100644 index 0000000..777d4bf Binary files /dev/null and b/priv/images/White/Man3.png differ diff --git a/priv/images/White/Man4.png b/priv/images/White/Man4.png new file mode 100644 index 0000000..ba194d7 Binary files /dev/null and b/priv/images/White/Man4.png differ diff --git a/priv/images/White/Man5-Dora.png b/priv/images/White/Man5-Dora.png new file mode 100644 index 0000000..ae1f296 Binary files /dev/null and b/priv/images/White/Man5-Dora.png differ diff --git a/priv/images/White/Man5.png b/priv/images/White/Man5.png new file mode 100644 index 0000000..db0e1e8 Binary files /dev/null and b/priv/images/White/Man5.png differ diff --git a/priv/images/White/Man6.png b/priv/images/White/Man6.png new file mode 100644 index 0000000..8209f7d Binary files /dev/null and b/priv/images/White/Man6.png differ diff --git a/priv/images/White/Man7.png b/priv/images/White/Man7.png new file mode 100644 index 0000000..740b352 Binary files /dev/null and b/priv/images/White/Man7.png differ diff --git a/priv/images/White/Man8.png b/priv/images/White/Man8.png new file mode 100644 index 0000000..52747e8 Binary files /dev/null and b/priv/images/White/Man8.png differ diff --git a/priv/images/White/Man9.png b/priv/images/White/Man9.png new file mode 100644 index 0000000..76f3260 Binary files /dev/null and b/priv/images/White/Man9.png differ diff --git a/priv/images/White/Nan.png b/priv/images/White/Nan.png new file mode 100644 index 0000000..c95a0a4 Binary files /dev/null and b/priv/images/White/Nan.png differ diff --git a/priv/images/White/Pei.png b/priv/images/White/Pei.png new file mode 100644 index 0000000..0423a1a Binary files /dev/null and b/priv/images/White/Pei.png differ diff --git a/priv/images/White/Pin1.png b/priv/images/White/Pin1.png new file mode 100644 index 0000000..788b122 Binary files /dev/null and b/priv/images/White/Pin1.png differ diff --git a/priv/images/White/Pin2.png b/priv/images/White/Pin2.png new file mode 100644 index 0000000..24db919 Binary files /dev/null and b/priv/images/White/Pin2.png differ diff --git a/priv/images/White/Pin3.png b/priv/images/White/Pin3.png new file mode 100644 index 0000000..c9cb1db Binary files /dev/null and b/priv/images/White/Pin3.png differ diff --git a/priv/images/White/Pin4.png b/priv/images/White/Pin4.png new file mode 100644 index 0000000..8a62119 Binary files /dev/null and b/priv/images/White/Pin4.png differ diff --git a/priv/images/White/Pin5-Dora.png b/priv/images/White/Pin5-Dora.png new file mode 100644 index 0000000..af8a48e Binary files /dev/null and b/priv/images/White/Pin5-Dora.png differ diff --git a/priv/images/White/Pin5.png b/priv/images/White/Pin5.png new file mode 100644 index 0000000..e1262f8 Binary files /dev/null and b/priv/images/White/Pin5.png differ diff --git a/priv/images/White/Pin6.png b/priv/images/White/Pin6.png new file mode 100644 index 0000000..6bdd1a5 Binary files /dev/null and b/priv/images/White/Pin6.png differ diff --git a/priv/images/White/Pin7.png b/priv/images/White/Pin7.png new file mode 100644 index 0000000..8d25212 Binary files /dev/null and b/priv/images/White/Pin7.png differ diff --git a/priv/images/White/Pin8.png b/priv/images/White/Pin8.png new file mode 100644 index 0000000..2f7e912 Binary files /dev/null and b/priv/images/White/Pin8.png differ diff --git a/priv/images/White/Pin9.png b/priv/images/White/Pin9.png new file mode 100644 index 0000000..c615133 Binary files /dev/null and b/priv/images/White/Pin9.png differ diff --git a/priv/images/White/Shaa.png b/priv/images/White/Shaa.png new file mode 100644 index 0000000..424bac9 Binary files /dev/null and b/priv/images/White/Shaa.png differ diff --git a/priv/images/White/Sou1.png b/priv/images/White/Sou1.png new file mode 100644 index 0000000..76c0cfe Binary files /dev/null and b/priv/images/White/Sou1.png differ diff --git a/priv/images/White/Sou2.png b/priv/images/White/Sou2.png new file mode 100644 index 0000000..ecdf96d Binary files /dev/null and b/priv/images/White/Sou2.png differ diff --git a/priv/images/White/Sou3.png b/priv/images/White/Sou3.png new file mode 100644 index 0000000..b6ab4de Binary files /dev/null and b/priv/images/White/Sou3.png differ diff --git a/priv/images/White/Sou4.png b/priv/images/White/Sou4.png new file mode 100644 index 0000000..0cb592e Binary files /dev/null and b/priv/images/White/Sou4.png differ diff --git a/priv/images/White/Sou5-Dora.png b/priv/images/White/Sou5-Dora.png new file mode 100644 index 0000000..84951f4 Binary files /dev/null and b/priv/images/White/Sou5-Dora.png differ diff --git a/priv/images/White/Sou5.png b/priv/images/White/Sou5.png new file mode 100644 index 0000000..e0f4c31 Binary files /dev/null and b/priv/images/White/Sou5.png differ diff --git a/priv/images/White/Sou6.png b/priv/images/White/Sou6.png new file mode 100644 index 0000000..7230b84 Binary files /dev/null and b/priv/images/White/Sou6.png differ diff --git a/priv/images/White/Sou7.png b/priv/images/White/Sou7.png new file mode 100644 index 0000000..529065f Binary files /dev/null and b/priv/images/White/Sou7.png differ diff --git a/priv/images/White/Sou8.png b/priv/images/White/Sou8.png new file mode 100644 index 0000000..b8f09eb Binary files /dev/null and b/priv/images/White/Sou8.png differ diff --git a/priv/images/White/Sou9.png b/priv/images/White/Sou9.png new file mode 100644 index 0000000..45a542d Binary files /dev/null and b/priv/images/White/Sou9.png differ diff --git a/priv/images/White/Ton.png b/priv/images/White/Ton.png new file mode 100644 index 0000000..1f8fc63 Binary files /dev/null and b/priv/images/White/Ton.png differ diff --git a/priv/index.html b/priv/index.html new file mode 100644 index 0000000..48d3027 --- /dev/null +++ b/priv/index.html @@ -0,0 +1,12 @@ + + +
+ +