console-shogi 0.1.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +19 -0
  4. data/exe/console-shogi +7 -0
  5. data/images/active/gote/fu.png +0 -0
  6. data/images/active/gote/gin.png +0 -0
  7. data/images/active/gote/gyoku.png +0 -0
  8. data/images/active/gote/hisha.png +0 -0
  9. data/images/active/gote/kaku.png +0 -0
  10. data/images/active/gote/keima.png +0 -0
  11. data/images/active/gote/kin.png +0 -0
  12. data/images/active/gote/kyosha.png +0 -0
  13. data/images/active/gote/narigin.png +0 -0
  14. data/images/active/gote/narikei.png +0 -0
  15. data/images/active/gote/narikyo.png +0 -0
  16. data/images/active/gote/ohsho.png +0 -0
  17. data/images/active/gote/ryu.png +0 -0
  18. data/images/active/gote/tokin.png +0 -0
  19. data/images/active/gote/uma.png +0 -0
  20. data/images/active/nonepiece.png +0 -0
  21. data/images/active/sente/fu.png +0 -0
  22. data/images/active/sente/gin.png +0 -0
  23. data/images/active/sente/gyoku.png +0 -0
  24. data/images/active/sente/hisha.png +0 -0
  25. data/images/active/sente/kaku.png +0 -0
  26. data/images/active/sente/keima.png +0 -0
  27. data/images/active/sente/kin.png +0 -0
  28. data/images/active/sente/kyosha.png +0 -0
  29. data/images/active/sente/narigin.png +0 -0
  30. data/images/active/sente/narikei.png +0 -0
  31. data/images/active/sente/narikyo.png +0 -0
  32. data/images/active/sente/ohsho.png +0 -0
  33. data/images/active/sente/ryu.png +0 -0
  34. data/images/active/sente/tokin.png +0 -0
  35. data/images/active/sente/uma.png +0 -0
  36. data/images/focused/gote/fu.png +0 -0
  37. data/images/focused/gote/gin.png +0 -0
  38. data/images/focused/gote/gyoku.png +0 -0
  39. data/images/focused/gote/hisha.png +0 -0
  40. data/images/focused/gote/kaku.png +0 -0
  41. data/images/focused/gote/keima.png +0 -0
  42. data/images/focused/gote/kin.png +0 -0
  43. data/images/focused/gote/kyosha.png +0 -0
  44. data/images/focused/gote/narigin.png +0 -0
  45. data/images/focused/gote/narikei.png +0 -0
  46. data/images/focused/gote/narikyo.png +0 -0
  47. data/images/focused/gote/ohsho.png +0 -0
  48. data/images/focused/gote/ryu.png +0 -0
  49. data/images/focused/gote/tokin.png +0 -0
  50. data/images/focused/gote/uma.png +0 -0
  51. data/images/focused/nonepiece.png +0 -0
  52. data/images/focused/sente/fu.png +0 -0
  53. data/images/focused/sente/gin.png +0 -0
  54. data/images/focused/sente/gyoku.png +0 -0
  55. data/images/focused/sente/hisha.png +0 -0
  56. data/images/focused/sente/kaku.png +0 -0
  57. data/images/focused/sente/keima.png +0 -0
  58. data/images/focused/sente/kin.png +0 -0
  59. data/images/focused/sente/kyosha.png +0 -0
  60. data/images/focused/sente/narigin.png +0 -0
  61. data/images/focused/sente/narikei.png +0 -0
  62. data/images/focused/sente/narikyo.png +0 -0
  63. data/images/focused/sente/ohsho.png +0 -0
  64. data/images/focused/sente/ryu.png +0 -0
  65. data/images/focused/sente/tokin.png +0 -0
  66. data/images/focused/sente/uma.png +0 -0
  67. data/lib/console_shogi/board.rb +5 -9
  68. data/lib/console_shogi/game.rb +118 -19
  69. data/lib/console_shogi/komadai.rb +11 -9
  70. data/lib/console_shogi/new_board_builder.rb +41 -41
  71. data/lib/console_shogi/piece.rb +34 -23
  72. data/lib/console_shogi/piece_movement_checker.rb +46 -0
  73. data/lib/console_shogi/piece_mover.rb +31 -48
  74. data/lib/console_shogi/piece_mover_on_komadai.rb +30 -36
  75. data/lib/console_shogi/player.rb +5 -13
  76. data/lib/console_shogi/teban.rb +8 -0
  77. data/lib/console_shogi/terminal/cursor.rb +80 -0
  78. data/lib/console_shogi/terminal/display_area.rb +30 -0
  79. data/lib/console_shogi/terminal/operator.rb +209 -0
  80. data/lib/console_shogi/version.rb +1 -1
  81. data/lib/console_shogi.rb +6 -1
  82. metadata +105 -38
  83. data/images/gote/nonepiece.png +0 -0
  84. data/lib/console_shogi/terminal_operator.rb +0 -211
  85. /data/images/{gote/shori.png → gote_shori.png} +0 -0
  86. /data/images/{gote → nomal/gote}/fu.png +0 -0
  87. /data/images/{gote → nomal/gote}/gin.png +0 -0
  88. /data/images/{gote → nomal/gote}/gyoku.png +0 -0
  89. /data/images/{gote → nomal/gote}/hisha.png +0 -0
  90. /data/images/{gote → nomal/gote}/kaku.png +0 -0
  91. /data/images/{gote → nomal/gote}/keima.png +0 -0
  92. /data/images/{gote → nomal/gote}/kin.png +0 -0
  93. /data/images/{gote → nomal/gote}/kyosha.png +0 -0
  94. /data/images/{gote → nomal/gote}/narigin.png +0 -0
  95. /data/images/{gote → nomal/gote}/narikei.png +0 -0
  96. /data/images/{gote → nomal/gote}/narikyo.png +0 -0
  97. /data/images/{gote → nomal/gote}/ohsho.png +0 -0
  98. /data/images/{gote → nomal/gote}/ryu.png +0 -0
  99. /data/images/{gote → nomal/gote}/tokin.png +0 -0
  100. /data/images/{gote → nomal/gote}/uma.png +0 -0
  101. /data/images/{sente → nomal}/nonepiece.png +0 -0
  102. /data/images/{sente → nomal/sente}/fu.png +0 -0
  103. /data/images/{sente → nomal/sente}/gin.png +0 -0
  104. /data/images/{sente → nomal/sente}/gyoku.png +0 -0
  105. /data/images/{sente → nomal/sente}/hisha.png +0 -0
  106. /data/images/{sente → nomal/sente}/kaku.png +0 -0
  107. /data/images/{sente → nomal/sente}/keima.png +0 -0
  108. /data/images/{sente → nomal/sente}/kin.png +0 -0
  109. /data/images/{sente → nomal/sente}/kyosha.png +0 -0
  110. /data/images/{sente → nomal/sente}/narigin.png +0 -0
  111. /data/images/{sente → nomal/sente}/narikei.png +0 -0
  112. /data/images/{sente → nomal/sente}/narikyo.png +0 -0
  113. /data/images/{sente → nomal/sente}/ohsho.png +0 -0
  114. /data/images/{sente → nomal/sente}/ryu.png +0 -0
  115. /data/images/{sente → nomal/sente}/tokin.png +0 -0
  116. /data/images/{sente → nomal/sente}/uma.png +0 -0
  117. /data/images/{sente/shori.png → sente_shori.png} +0 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes