mjai 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/mjai +9 -0
- data/bin/mjai-shanten +9 -0
- data/bin/mjai-tsumogiri +9 -0
- data/lib/mjai/action.rb +41 -0
- data/lib/mjai/active_game.rb +230 -0
- data/lib/mjai/archive.rb +46 -0
- data/lib/mjai/archive_player.rb +47 -0
- data/lib/mjai/context.rb +34 -0
- data/lib/mjai/file_converter.rb +86 -0
- data/lib/mjai/furo.rb +57 -0
- data/lib/mjai/game.rb +357 -0
- data/lib/mjai/hora.rb +528 -0
- data/lib/mjai/jsonizable.rb +171 -0
- data/lib/mjai/mentsu.rb +46 -0
- data/lib/mjai/mjai_command.rb +93 -0
- data/lib/mjai/mjson_archive.rb +25 -0
- data/lib/mjai/pai.rb +138 -0
- data/lib/mjai/player.rb +340 -0
- data/lib/mjai/puppet_player.rb +14 -0
- data/lib/mjai/shanten_analysis.rb +273 -0
- data/lib/mjai/shanten_player.rb +102 -0
- data/lib/mjai/tcp_client_game.rb +63 -0
- data/lib/mjai/tcp_game_server.rb +205 -0
- data/lib/mjai/tcp_player.rb +66 -0
- data/lib/mjai/tenhou_archive.rb +412 -0
- data/lib/mjai/tenpai_analysis.rb +62 -0
- data/lib/mjai/tsumogiri_player.rb +20 -0
- data/lib/mjai/validation_error.rb +7 -0
- data/lib/mjai/with_fields.rb +18 -0
- data/share/html/css/style.css +77 -0
- data/share/html/css/style.scss +106 -0
- data/share/html/images/README.txt +1 -0
- data/share/html/images/b_1_1.gif +0 -0
- data/share/html/images/b_1_2.gif +0 -0
- data/share/html/images/b_5_1.gif +0 -0
- data/share/html/images/b_5_2.gif +0 -0
- data/share/html/images/b_8_1.gif +0 -0
- data/share/html/images/b_8_2.gif +0 -0
- data/share/html/images/b_9_1.gif +0 -0
- data/share/html/images/b_9_2.gif +0 -0
- data/share/html/images/blank.png +0 -0
- data/share/html/images/c_c_1.gif +0 -0
- data/share/html/images/c_c_2.gif +0 -0
- data/share/html/images/c_c_3.gif +0 -0
- data/share/html/images/c_c_4.gif +0 -0
- data/share/html/images/c_e_1.gif +0 -0
- data/share/html/images/c_e_2.gif +0 -0
- data/share/html/images/c_e_3.gif +0 -0
- data/share/html/images/c_e_4.gif +0 -0
- data/share/html/images/c_n_1.gif +0 -0
- data/share/html/images/c_n_2.gif +0 -0
- data/share/html/images/c_n_3.gif +0 -0
- data/share/html/images/c_n_4.gif +0 -0
- data/share/html/images/c_s_1.gif +0 -0
- data/share/html/images/c_s_2.gif +0 -0
- data/share/html/images/c_s_3.gif +0 -0
- data/share/html/images/c_s_4.gif +0 -0
- data/share/html/images/c_w_1.gif +0 -0
- data/share/html/images/c_w_2.gif +0 -0
- data/share/html/images/c_w_3.gif +0 -0
- data/share/html/images/c_w_4.gif +0 -0
- data/share/html/images/dice.gif +0 -0
- data/share/html/images/p_bk_0.gif +0 -0
- data/share/html/images/p_bk_1.gif +0 -0
- data/share/html/images/p_bk_2.gif +0 -0
- data/share/html/images/p_bk_3.gif +0 -0
- data/share/html/images/p_bk_4.gif +0 -0
- data/share/html/images/p_bk_5.gif +0 -0
- data/share/html/images/p_bk_6.gif +0 -0
- data/share/html/images/p_bk_7.gif +0 -0
- data/share/html/images/p_ji_c_0.gif +0 -0
- data/share/html/images/p_ji_c_1.gif +0 -0
- data/share/html/images/p_ji_c_2.gif +0 -0
- data/share/html/images/p_ji_c_3.gif +0 -0
- data/share/html/images/p_ji_c_4.gif +0 -0
- data/share/html/images/p_ji_c_5.gif +0 -0
- data/share/html/images/p_ji_c_6.gif +0 -0
- data/share/html/images/p_ji_c_7.gif +0 -0
- data/share/html/images/p_ji_e_0.gif +0 -0
- data/share/html/images/p_ji_e_1.gif +0 -0
- data/share/html/images/p_ji_e_2.gif +0 -0
- data/share/html/images/p_ji_e_3.gif +0 -0
- data/share/html/images/p_ji_e_4.gif +0 -0
- data/share/html/images/p_ji_e_5.gif +0 -0
- data/share/html/images/p_ji_e_6.gif +0 -0
- data/share/html/images/p_ji_e_7.gif +0 -0
- data/share/html/images/p_ji_h_0.gif +0 -0
- data/share/html/images/p_ji_h_1.gif +0 -0
- data/share/html/images/p_ji_h_2.gif +0 -0
- data/share/html/images/p_ji_h_3.gif +0 -0
- data/share/html/images/p_ji_h_4.gif +0 -0
- data/share/html/images/p_ji_h_5.gif +0 -0
- data/share/html/images/p_ji_h_6.gif +0 -0
- data/share/html/images/p_ji_h_7.gif +0 -0
- data/share/html/images/p_ji_n_0.gif +0 -0
- data/share/html/images/p_ji_n_1.gif +0 -0
- data/share/html/images/p_ji_n_2.gif +0 -0
- data/share/html/images/p_ji_n_3.gif +0 -0
- data/share/html/images/p_ji_n_4.gif +0 -0
- data/share/html/images/p_ji_n_5.gif +0 -0
- data/share/html/images/p_ji_n_6.gif +0 -0
- data/share/html/images/p_ji_n_7.gif +0 -0
- data/share/html/images/p_ji_s_0.gif +0 -0
- data/share/html/images/p_ji_s_1.gif +0 -0
- data/share/html/images/p_ji_s_2.gif +0 -0
- data/share/html/images/p_ji_s_3.gif +0 -0
- data/share/html/images/p_ji_s_4.gif +0 -0
- data/share/html/images/p_ji_s_5.gif +0 -0
- data/share/html/images/p_ji_s_6.gif +0 -0
- data/share/html/images/p_ji_s_7.gif +0 -0
- data/share/html/images/p_ji_w_0.gif +0 -0
- data/share/html/images/p_ji_w_1.gif +0 -0
- data/share/html/images/p_ji_w_2.gif +0 -0
- data/share/html/images/p_ji_w_3.gif +0 -0
- data/share/html/images/p_ji_w_4.gif +0 -0
- data/share/html/images/p_ji_w_5.gif +0 -0
- data/share/html/images/p_ji_w_6.gif +0 -0
- data/share/html/images/p_ji_w_7.gif +0 -0
- data/share/html/images/p_ms1_0.gif +0 -0
- data/share/html/images/p_ms1_1.gif +0 -0
- data/share/html/images/p_ms1_2.gif +0 -0
- data/share/html/images/p_ms1_3.gif +0 -0
- data/share/html/images/p_ms1_4.gif +0 -0
- data/share/html/images/p_ms1_5.gif +0 -0
- data/share/html/images/p_ms1_6.gif +0 -0
- data/share/html/images/p_ms1_7.gif +0 -0
- data/share/html/images/p_ms2_0.gif +0 -0
- data/share/html/images/p_ms2_1.gif +0 -0
- data/share/html/images/p_ms2_2.gif +0 -0
- data/share/html/images/p_ms2_3.gif +0 -0
- data/share/html/images/p_ms2_4.gif +0 -0
- data/share/html/images/p_ms2_5.gif +0 -0
- data/share/html/images/p_ms2_6.gif +0 -0
- data/share/html/images/p_ms2_7.gif +0 -0
- data/share/html/images/p_ms3_0.gif +0 -0
- data/share/html/images/p_ms3_1.gif +0 -0
- data/share/html/images/p_ms3_2.gif +0 -0
- data/share/html/images/p_ms3_3.gif +0 -0
- data/share/html/images/p_ms3_4.gif +0 -0
- data/share/html/images/p_ms3_5.gif +0 -0
- data/share/html/images/p_ms3_6.gif +0 -0
- data/share/html/images/p_ms3_7.gif +0 -0
- data/share/html/images/p_ms4_0.gif +0 -0
- data/share/html/images/p_ms4_1.gif +0 -0
- data/share/html/images/p_ms4_2.gif +0 -0
- data/share/html/images/p_ms4_3.gif +0 -0
- data/share/html/images/p_ms4_4.gif +0 -0
- data/share/html/images/p_ms4_5.gif +0 -0
- data/share/html/images/p_ms4_6.gif +0 -0
- data/share/html/images/p_ms4_7.gif +0 -0
- data/share/html/images/p_ms5_0.gif +0 -0
- data/share/html/images/p_ms5_1.gif +0 -0
- data/share/html/images/p_ms5_2.gif +0 -0
- data/share/html/images/p_ms5_3.gif +0 -0
- data/share/html/images/p_ms5_4.gif +0 -0
- data/share/html/images/p_ms5_5.gif +0 -0
- data/share/html/images/p_ms5_6.gif +0 -0
- data/share/html/images/p_ms5_7.gif +0 -0
- data/share/html/images/p_ms5r_1.png +0 -0
- data/share/html/images/p_ms5r_3.png +0 -0
- data/share/html/images/p_ms6_0.gif +0 -0
- data/share/html/images/p_ms6_1.gif +0 -0
- data/share/html/images/p_ms6_2.gif +0 -0
- data/share/html/images/p_ms6_3.gif +0 -0
- data/share/html/images/p_ms6_4.gif +0 -0
- data/share/html/images/p_ms6_5.gif +0 -0
- data/share/html/images/p_ms6_6.gif +0 -0
- data/share/html/images/p_ms6_7.gif +0 -0
- data/share/html/images/p_ms7_0.gif +0 -0
- data/share/html/images/p_ms7_1.gif +0 -0
- data/share/html/images/p_ms7_2.gif +0 -0
- data/share/html/images/p_ms7_3.gif +0 -0
- data/share/html/images/p_ms7_4.gif +0 -0
- data/share/html/images/p_ms7_5.gif +0 -0
- data/share/html/images/p_ms7_6.gif +0 -0
- data/share/html/images/p_ms7_7.gif +0 -0
- data/share/html/images/p_ms8_0.gif +0 -0
- data/share/html/images/p_ms8_1.gif +0 -0
- data/share/html/images/p_ms8_2.gif +0 -0
- data/share/html/images/p_ms8_3.gif +0 -0
- data/share/html/images/p_ms8_4.gif +0 -0
- data/share/html/images/p_ms8_5.gif +0 -0
- data/share/html/images/p_ms8_6.gif +0 -0
- data/share/html/images/p_ms8_7.gif +0 -0
- data/share/html/images/p_ms9_0.gif +0 -0
- data/share/html/images/p_ms9_1.gif +0 -0
- data/share/html/images/p_ms9_2.gif +0 -0
- data/share/html/images/p_ms9_3.gif +0 -0
- data/share/html/images/p_ms9_4.gif +0 -0
- data/share/html/images/p_ms9_5.gif +0 -0
- data/share/html/images/p_ms9_6.gif +0 -0
- data/share/html/images/p_ms9_7.gif +0 -0
- data/share/html/images/p_no_0.gif +0 -0
- data/share/html/images/p_no_1.gif +0 -0
- data/share/html/images/p_no_2.gif +0 -0
- data/share/html/images/p_no_3.gif +0 -0
- data/share/html/images/p_no_4.gif +0 -0
- data/share/html/images/p_no_5.gif +0 -0
- data/share/html/images/p_no_6.gif +0 -0
- data/share/html/images/p_no_7.gif +0 -0
- data/share/html/images/p_ps1_0.gif +0 -0
- data/share/html/images/p_ps1_1.gif +0 -0
- data/share/html/images/p_ps1_2.gif +0 -0
- data/share/html/images/p_ps1_3.gif +0 -0
- data/share/html/images/p_ps1_4.gif +0 -0
- data/share/html/images/p_ps1_5.gif +0 -0
- data/share/html/images/p_ps1_6.gif +0 -0
- data/share/html/images/p_ps1_7.gif +0 -0
- data/share/html/images/p_ps2_0.gif +0 -0
- data/share/html/images/p_ps2_1.gif +0 -0
- data/share/html/images/p_ps2_2.gif +0 -0
- data/share/html/images/p_ps2_3.gif +0 -0
- data/share/html/images/p_ps2_4.gif +0 -0
- data/share/html/images/p_ps2_5.gif +0 -0
- data/share/html/images/p_ps2_6.gif +0 -0
- data/share/html/images/p_ps2_7.gif +0 -0
- data/share/html/images/p_ps3_0.gif +0 -0
- data/share/html/images/p_ps3_1.gif +0 -0
- data/share/html/images/p_ps3_2.gif +0 -0
- data/share/html/images/p_ps3_3.gif +0 -0
- data/share/html/images/p_ps3_4.gif +0 -0
- data/share/html/images/p_ps3_5.gif +0 -0
- data/share/html/images/p_ps3_6.gif +0 -0
- data/share/html/images/p_ps3_7.gif +0 -0
- data/share/html/images/p_ps4_0.gif +0 -0
- data/share/html/images/p_ps4_1.gif +0 -0
- data/share/html/images/p_ps4_2.gif +0 -0
- data/share/html/images/p_ps4_3.gif +0 -0
- data/share/html/images/p_ps4_4.gif +0 -0
- data/share/html/images/p_ps4_5.gif +0 -0
- data/share/html/images/p_ps4_6.gif +0 -0
- data/share/html/images/p_ps4_7.gif +0 -0
- data/share/html/images/p_ps5_0.gif +0 -0
- data/share/html/images/p_ps5_1.gif +0 -0
- data/share/html/images/p_ps5_2.gif +0 -0
- data/share/html/images/p_ps5_3.gif +0 -0
- data/share/html/images/p_ps5_4.gif +0 -0
- data/share/html/images/p_ps5_5.gif +0 -0
- data/share/html/images/p_ps5_6.gif +0 -0
- data/share/html/images/p_ps5_7.gif +0 -0
- data/share/html/images/p_ps5r_1.png +0 -0
- data/share/html/images/p_ps5r_3.png +0 -0
- data/share/html/images/p_ps6_0.gif +0 -0
- data/share/html/images/p_ps6_1.gif +0 -0
- data/share/html/images/p_ps6_2.gif +0 -0
- data/share/html/images/p_ps6_3.gif +0 -0
- data/share/html/images/p_ps6_4.gif +0 -0
- data/share/html/images/p_ps6_5.gif +0 -0
- data/share/html/images/p_ps6_6.gif +0 -0
- data/share/html/images/p_ps6_7.gif +0 -0
- data/share/html/images/p_ps7_0.gif +0 -0
- data/share/html/images/p_ps7_1.gif +0 -0
- data/share/html/images/p_ps7_2.gif +0 -0
- data/share/html/images/p_ps7_3.gif +0 -0
- data/share/html/images/p_ps7_4.gif +0 -0
- data/share/html/images/p_ps7_5.gif +0 -0
- data/share/html/images/p_ps7_6.gif +0 -0
- data/share/html/images/p_ps7_7.gif +0 -0
- data/share/html/images/p_ps8_0.gif +0 -0
- data/share/html/images/p_ps8_1.gif +0 -0
- data/share/html/images/p_ps8_2.gif +0 -0
- data/share/html/images/p_ps8_3.gif +0 -0
- data/share/html/images/p_ps8_4.gif +0 -0
- data/share/html/images/p_ps8_5.gif +0 -0
- data/share/html/images/p_ps8_6.gif +0 -0
- data/share/html/images/p_ps8_7.gif +0 -0
- data/share/html/images/p_ps9_0.gif +0 -0
- data/share/html/images/p_ps9_1.gif +0 -0
- data/share/html/images/p_ps9_2.gif +0 -0
- data/share/html/images/p_ps9_3.gif +0 -0
- data/share/html/images/p_ps9_4.gif +0 -0
- data/share/html/images/p_ps9_5.gif +0 -0
- data/share/html/images/p_ps9_6.gif +0 -0
- data/share/html/images/p_ps9_7.gif +0 -0
- data/share/html/images/p_ss1_0.gif +0 -0
- data/share/html/images/p_ss1_1.gif +0 -0
- data/share/html/images/p_ss1_2.gif +0 -0
- data/share/html/images/p_ss1_3.gif +0 -0
- data/share/html/images/p_ss1_4.gif +0 -0
- data/share/html/images/p_ss1_5.gif +0 -0
- data/share/html/images/p_ss1_6.gif +0 -0
- data/share/html/images/p_ss1_7.gif +0 -0
- data/share/html/images/p_ss2_0.gif +0 -0
- data/share/html/images/p_ss2_1.gif +0 -0
- data/share/html/images/p_ss2_2.gif +0 -0
- data/share/html/images/p_ss2_3.gif +0 -0
- data/share/html/images/p_ss2_4.gif +0 -0
- data/share/html/images/p_ss2_5.gif +0 -0
- data/share/html/images/p_ss2_6.gif +0 -0
- data/share/html/images/p_ss2_7.gif +0 -0
- data/share/html/images/p_ss3_0.gif +0 -0
- data/share/html/images/p_ss3_1.gif +0 -0
- data/share/html/images/p_ss3_2.gif +0 -0
- data/share/html/images/p_ss3_3.gif +0 -0
- data/share/html/images/p_ss3_4.gif +0 -0
- data/share/html/images/p_ss3_5.gif +0 -0
- data/share/html/images/p_ss3_6.gif +0 -0
- data/share/html/images/p_ss3_7.gif +0 -0
- data/share/html/images/p_ss4_0.gif +0 -0
- data/share/html/images/p_ss4_1.gif +0 -0
- data/share/html/images/p_ss4_2.gif +0 -0
- data/share/html/images/p_ss4_3.gif +0 -0
- data/share/html/images/p_ss4_4.gif +0 -0
- data/share/html/images/p_ss4_5.gif +0 -0
- data/share/html/images/p_ss4_6.gif +0 -0
- data/share/html/images/p_ss4_7.gif +0 -0
- data/share/html/images/p_ss5_0.gif +0 -0
- data/share/html/images/p_ss5_1.gif +0 -0
- data/share/html/images/p_ss5_2.gif +0 -0
- data/share/html/images/p_ss5_3.gif +0 -0
- data/share/html/images/p_ss5_4.gif +0 -0
- data/share/html/images/p_ss5_5.gif +0 -0
- data/share/html/images/p_ss5_6.gif +0 -0
- data/share/html/images/p_ss5_7.gif +0 -0
- data/share/html/images/p_ss5r_1.png +0 -0
- data/share/html/images/p_ss5r_3.png +0 -0
- data/share/html/images/p_ss6_0.gif +0 -0
- data/share/html/images/p_ss6_1.gif +0 -0
- data/share/html/images/p_ss6_2.gif +0 -0
- data/share/html/images/p_ss6_3.gif +0 -0
- data/share/html/images/p_ss6_4.gif +0 -0
- data/share/html/images/p_ss6_5.gif +0 -0
- data/share/html/images/p_ss6_6.gif +0 -0
- data/share/html/images/p_ss6_7.gif +0 -0
- data/share/html/images/p_ss7_0.gif +0 -0
- data/share/html/images/p_ss7_1.gif +0 -0
- data/share/html/images/p_ss7_2.gif +0 -0
- data/share/html/images/p_ss7_3.gif +0 -0
- data/share/html/images/p_ss7_4.gif +0 -0
- data/share/html/images/p_ss7_5.gif +0 -0
- data/share/html/images/p_ss7_6.gif +0 -0
- data/share/html/images/p_ss7_7.gif +0 -0
- data/share/html/images/p_ss8_0.gif +0 -0
- data/share/html/images/p_ss8_1.gif +0 -0
- data/share/html/images/p_ss8_2.gif +0 -0
- data/share/html/images/p_ss8_3.gif +0 -0
- data/share/html/images/p_ss8_4.gif +0 -0
- data/share/html/images/p_ss8_5.gif +0 -0
- data/share/html/images/p_ss8_6.gif +0 -0
- data/share/html/images/p_ss8_7.gif +0 -0
- data/share/html/images/p_ss9_0.gif +0 -0
- data/share/html/images/p_ss9_1.gif +0 -0
- data/share/html/images/p_ss9_2.gif +0 -0
- data/share/html/images/p_ss9_3.gif +0 -0
- data/share/html/images/p_ss9_4.gif +0 -0
- data/share/html/images/p_ss9_5.gif +0 -0
- data/share/html/images/p_ss9_6.gif +0 -0
- data/share/html/images/p_ss9_7.gif +0 -0
- data/share/html/js/archive_player.coffee +379 -0
- data/share/html/js/archive_player.js +505 -0
- data/share/html/js/dytem.coffee +83 -0
- data/share/html/js/dytem.js +128 -0
- data/share/html/js/jquery-1.7.2.min.js +4 -0
- data/share/html/views/archive_player.erb +61 -0
- metadata +435 -0
@@ -0,0 +1,62 @@
|
|
1
|
+
require "mjai/shanten_analysis"
|
2
|
+
require "mjai/pai"
|
3
|
+
|
4
|
+
|
5
|
+
module Mjai
|
6
|
+
|
7
|
+
class TenpaiAnalysis
|
8
|
+
|
9
|
+
ALL_YAOCHUS = Pai.parse_pais("19m19s19pESWNPFC")
|
10
|
+
|
11
|
+
def initialize(pais)
|
12
|
+
@pais = pais
|
13
|
+
@shanten = ShantenAnalysis.new(@pais, 0)
|
14
|
+
end
|
15
|
+
|
16
|
+
def tenpai?
|
17
|
+
return @shanten.shanten == 0
|
18
|
+
end
|
19
|
+
|
20
|
+
def waited_pais
|
21
|
+
raise(ArgumentError, "invalid number of pais") if @pais.size % 3 != 1
|
22
|
+
raise("not tenpai") if !self.tenpai?
|
23
|
+
pai_set = Hash.new(0)
|
24
|
+
for pai in @pais
|
25
|
+
pai_set[pai.remove_red()] += 1
|
26
|
+
end
|
27
|
+
result = []
|
28
|
+
for mentsus in @shanten.combinations
|
29
|
+
case mentsus
|
30
|
+
when :chitoitsu
|
31
|
+
result.push(pai_set.find(){ |pai, n| n == 1 }[0])
|
32
|
+
when :kokushimuso
|
33
|
+
missing = ALL_YAOCHUS - pai_set.keys
|
34
|
+
if missing.empty?
|
35
|
+
result += ALL_YAOCHUS
|
36
|
+
else
|
37
|
+
result.push(missing[0])
|
38
|
+
end
|
39
|
+
else
|
40
|
+
case mentsus.select(){ |t, ps| t == :toitsu }.size
|
41
|
+
when 0 # 単騎
|
42
|
+
(type, pais) = mentsus.find(){ |t, ps| t == :single }
|
43
|
+
result.push(pais[0])
|
44
|
+
when 1 # 両面、辺張、嵌張
|
45
|
+
(type, pais) = mentsus.find(){ |t, ps| [:ryanpen, :kanta].include?(t) }
|
46
|
+
relative_numbers = type == :ryanpen ? [-1, 2] : [1]
|
47
|
+
result += relative_numbers.map(){ |r| pais[0].number + r }.
|
48
|
+
select(){ |n| (1..9).include?(n) }.
|
49
|
+
map(){ |n| Pai.new(pais[0].type, n) }
|
50
|
+
when 2 # 双碰
|
51
|
+
result += mentsus.select(){ |t, ps| t == :toitsu }.map(){ |t, ps| ps[0] }
|
52
|
+
else
|
53
|
+
raise("should not happen")
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
57
|
+
return result.sort().uniq()
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
require "mjai/player"
|
2
|
+
|
3
|
+
|
4
|
+
module Mjai
|
5
|
+
|
6
|
+
class TsumogiriPlayer < Player
|
7
|
+
|
8
|
+
def respond_to_action(action)
|
9
|
+
case action.type
|
10
|
+
when :tsumo, :chi, :pon
|
11
|
+
if action.actor == self
|
12
|
+
return create_action({:type => :dahai, :pai => self.tehais[-1], :tsumogiri => true})
|
13
|
+
end
|
14
|
+
end
|
15
|
+
return nil
|
16
|
+
end
|
17
|
+
|
18
|
+
end
|
19
|
+
|
20
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
/* These sizes should be even numbers to get good rendering when they are rotated. */
|
2
|
+
/* Original size: 33x59 */
|
3
|
+
/* Original size: 44x49 */
|
4
|
+
.repeated {
|
5
|
+
display: none; }
|
6
|
+
|
7
|
+
.pai {
|
8
|
+
width: 16px;
|
9
|
+
height: 30px; }
|
10
|
+
|
11
|
+
.laid-pai {
|
12
|
+
width: 22px;
|
13
|
+
height: 26px; }
|
14
|
+
|
15
|
+
.board {
|
16
|
+
background-color: green;
|
17
|
+
position: absolute;
|
18
|
+
left: 0px;
|
19
|
+
top: 0px;
|
20
|
+
width: 400px;
|
21
|
+
height: 400px; }
|
22
|
+
|
23
|
+
.player {
|
24
|
+
/* border: 1px black solid; */
|
25
|
+
width: 400px;
|
26
|
+
position: absolute; }
|
27
|
+
|
28
|
+
.player-0 {
|
29
|
+
left: 0px;
|
30
|
+
top: 250px;
|
31
|
+
-webkit-transform: rotate(0deg); }
|
32
|
+
|
33
|
+
.player-1 {
|
34
|
+
left: 125px;
|
35
|
+
top: 125px;
|
36
|
+
-webkit-transform: rotate(270deg); }
|
37
|
+
|
38
|
+
.player-2 {
|
39
|
+
left: 0px;
|
40
|
+
top: 0px;
|
41
|
+
-webkit-transform: rotate(180deg); }
|
42
|
+
|
43
|
+
.player-3 {
|
44
|
+
left: -125px;
|
45
|
+
top: 125px;
|
46
|
+
-webkit-transform: rotate(90deg); }
|
47
|
+
|
48
|
+
.wanpais-container {
|
49
|
+
position: absolute;
|
50
|
+
left: 152px;
|
51
|
+
top: 185px; }
|
52
|
+
|
53
|
+
.ho {
|
54
|
+
margin-left: 152px;
|
55
|
+
margin-bottom: 30px; }
|
56
|
+
|
57
|
+
.furo-container {
|
58
|
+
float: right; }
|
59
|
+
|
60
|
+
.tehai-container {
|
61
|
+
margin-left: 88px;
|
62
|
+
float: left; }
|
63
|
+
|
64
|
+
.tsumo-pai {
|
65
|
+
margin-left: 4px; }
|
66
|
+
|
67
|
+
.player-footer {
|
68
|
+
clear: both; }
|
69
|
+
|
70
|
+
.pai-row {
|
71
|
+
height: 30px; }
|
72
|
+
|
73
|
+
.controller-container {
|
74
|
+
position: absolute;
|
75
|
+
left: 400px;
|
76
|
+
top: 0px;
|
77
|
+
padding: 8px; }
|
@@ -0,0 +1,106 @@
|
|
1
|
+
/* These sizes should be even numbers to get good rendering when they are rotated. */
|
2
|
+
/* Original size: 33x59 */
|
3
|
+
$pai-width: 16px;
|
4
|
+
$pai-height: 30px;
|
5
|
+
/* Original size: 44x49 */
|
6
|
+
$laid-pai-width: 22px;
|
7
|
+
$laid-pai-height: 26px;
|
8
|
+
|
9
|
+
$ho-tehai-margin: $pai-height;
|
10
|
+
$board-width: $pai-width * 25;
|
11
|
+
$player-height: $pai-height * 4 + $ho-tehai-margin;
|
12
|
+
|
13
|
+
.repeated {
|
14
|
+
display: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
.pai {
|
18
|
+
width: $pai-width;
|
19
|
+
height: $pai-height;
|
20
|
+
}
|
21
|
+
|
22
|
+
.laid-pai {
|
23
|
+
width: $laid-pai-width;
|
24
|
+
height: $laid-pai-height;
|
25
|
+
}
|
26
|
+
|
27
|
+
.board {
|
28
|
+
background-color: green;
|
29
|
+
position: absolute;
|
30
|
+
left: 0px;
|
31
|
+
top: 0px;
|
32
|
+
width: $board-width;
|
33
|
+
height: $board-width;
|
34
|
+
}
|
35
|
+
|
36
|
+
.player {
|
37
|
+
/* border: 1px black solid; */
|
38
|
+
width: $board-width;
|
39
|
+
position: absolute;
|
40
|
+
}
|
41
|
+
|
42
|
+
.player-0 {
|
43
|
+
left: 0px;
|
44
|
+
top: $board-width - $player-height;
|
45
|
+
-webkit-transform: rotate(0deg);
|
46
|
+
}
|
47
|
+
|
48
|
+
.player-1 {
|
49
|
+
left: ($board-width - $player-height / 2) - $board-width / 2;
|
50
|
+
top: $board-width / 2 - $player-height / 2;
|
51
|
+
-webkit-transform: rotate(270deg);
|
52
|
+
}
|
53
|
+
|
54
|
+
.player-2 {
|
55
|
+
left: 0px;
|
56
|
+
top: 0px;
|
57
|
+
-webkit-transform: rotate(180deg);
|
58
|
+
}
|
59
|
+
|
60
|
+
.player-3 {
|
61
|
+
left: $player-height / 2 - $board-width / 2;
|
62
|
+
top: $board-width / 2 - $player-height / 2;
|
63
|
+
-webkit-transform: rotate(90deg);
|
64
|
+
}
|
65
|
+
|
66
|
+
.wanpais-container {
|
67
|
+
position: absolute;
|
68
|
+
left: $board-width / 2 - $pai-width * 6 / 2;
|
69
|
+
top: $board-width / 2 - $pai-height / 2;
|
70
|
+
}
|
71
|
+
|
72
|
+
.ho {
|
73
|
+
margin-left: ($board-width - $pai-width * 6) / 2;
|
74
|
+
margin-bottom: $ho-tehai-margin;
|
75
|
+
}
|
76
|
+
|
77
|
+
.furo-container {
|
78
|
+
float: right;
|
79
|
+
}
|
80
|
+
|
81
|
+
.tehai-container {
|
82
|
+
margin-left: ($board-width - $pai-width * 14) / 2;
|
83
|
+
float: left;
|
84
|
+
}
|
85
|
+
|
86
|
+
.tsumo-pai {
|
87
|
+
margin-left: $pai-width / 4;
|
88
|
+
}
|
89
|
+
|
90
|
+
.player-footer {
|
91
|
+
clear: both;
|
92
|
+
}
|
93
|
+
|
94
|
+
.pai-row {
|
95
|
+
height: $pai-height;
|
96
|
+
}
|
97
|
+
|
98
|
+
.tehai-container {
|
99
|
+
}
|
100
|
+
|
101
|
+
.controller-container {
|
102
|
+
position: absolute;
|
103
|
+
left: $board-width;
|
104
|
+
top: 0px;
|
105
|
+
padding: 8px;
|
106
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
Taken from http://www.mj-king.net/sozai/ with some modification.
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|