<template>
<div id="app">
  <div class="container">
    <h1>shogi-player demo</h1>
    <ShogiPlayer :kifu_body="kifu_body" :turn_start="121" :keyboard_operation_flag="true" />

    <br>
    <h4>棋譜</h4>
    <textarea v-model="kifu_body" class="form-control" />
    <p class="links">
      <a href="https://github.com/akicho8/shogi-player">Github</a>
    </p>
  </div>
</div>
</template>

<script>
import ShogiPlayer from './components/ShogiPlayer'

export default {
  name: 'app',

  created() {
    this.kifu_body = "position startpos moves 7g7f 8c8d 2g2f 4a3b 6i7h 8d8e 8h7g 3c3d 7i6h 2b7g+ 6h7g 3a2b 3i3h 7a6b 3g3f 2b3c 4g4f 6c6d 5i6h 6b6c 2i3g 5a4b 3h4g 7c7d 4i4h 8a7c 2h2i 8b8a 6g6f 6a6b 4g5f 9c9d 9g9f 1c1d 1g1f 6c5d 6h7i 5d6c 7i8h 6c5d 2f2e 5d6c 5f6g 6c5d 5g5f 4c4d 2i5i 4b3a 5f5e 5d4c 6g5f 3a2b 5i6i 2b3a 6i2i 3a2b 4f4e 4d4e 5f4e 8e8f 8g8f P*8e 8f8e 9d9e 9f9e 7d7e 7f7e 6d6e B*7f 6b5b 7g8f 6e6f 8i7g P*4d 4e5f 3d3e 3f3e 7c8e 7g8e P*3f 3g4e 4d4e P*6d N*7b 6d6c+ 5b6c 7f4c+ 3b4c S*5b B*7f 7h7g P*8g 7g8g B*6g 5f6g 7f8g+ 8h8g 6f6g+ B*8i 6g6f 5b4c+ G*7f 8g8h 7f8f 8h7i 8f7g P*6h S*6g 8i6g 6f6g 4c3c 2b3c S*3d 3c4d B*2b S*3c 3d3c 4d5e 3c3b 5e6d N*7f 7g7f 6h6g B*4f S*5g N*5e S*5f 8a8e 5g4f S*7h 7i7h 5e6g+ 5f6g 8e8g+ 7h7i 7f6g 2b5e+ 6d7e G*6e 7e8e N*7g 8e7f 6e7e 7f7e 5e6e 7e8d 6e8g S*6h 7i8i 6h7g+ R*8a N*8c P*8e 8d7c P*7d"
    this.kifu_body = `
先手の囲い：銀矢倉
後手の囲い：銀矢倉
先手の戦型：角換わり腰掛け銀
後手の戦型：角換わり腰掛け銀
手合割：平手
手数----指手---------消費時間--
   1 ７六歩(77)   (00:00/00:00:00)
   2 ８四歩(83)   (00:00/00:00:00)
   3 ２六歩(27)   (00:00/00:00:00)
   4 ３二金(41)   (00:00/00:00:00)
   5 ７八金(69)   (00:00/00:00:00)
   6 ８五歩(84)   (00:00/00:00:00)
   7 ７七角(88)   (00:00/00:00:00)
   8 ３四歩(33)   (00:00/00:00:00)
   9 ６八銀(79)   (00:00/00:00:00)
  10 ７七角成(22) (00:00/00:00:00)
  11 ７七銀(68)   (00:00/00:00:00)
*▲戦型：角換わり
  12 ２二銀(31)   (00:00/00:00:00)
  13 ３八銀(39)   (00:00/00:00:00)
  14 ６二銀(71)   (00:00/00:00:00)
  15 ３六歩(37)   (00:00/00:00:00)
  16 ３三銀(22)   (00:00/00:00:00)
  17 ４六歩(47)   (00:00/00:00:00)
  18 ６四歩(63)   (00:00/00:00:00)
  19 ６八玉(59)   (00:00/00:00:00)
  20 ６三銀(62)   (00:00/00:00:00)
  21 ３七桂(29)   (00:00/00:00:00)
  22 ４二玉(51)   (00:00/00:00:00)
  23 ４七銀(38)   (00:00/00:00:00)
  24 ７四歩(73)   (00:00/00:00:00)
  25 ４八金(49)   (00:00/00:00:00)
  26 ７三桂(81)   (00:00/00:00:00)
  27 ２九飛(28)   (00:00/00:00:00)
  28 ８一飛(82)   (00:00/00:00:00)
  29 ６六歩(67)   (00:00/00:00:00)
  30 ６二金(61)   (00:00/00:00:00)
  31 ５六銀(47)   (00:00/00:00:00)
*▲戦型：角換わり腰掛け銀
  32 ９四歩(93)   (00:00/00:00:00)
  33 ９六歩(97)   (00:00/00:00:00)
  34 １四歩(13)   (00:00/00:00:00)
  35 １六歩(17)   (00:00/00:00:00)
  36 ５四銀(63)   (00:00/00:00:00)
*△戦型：角換わり腰掛け銀
  37 ７九玉(68)   (00:00/00:00:00)
  38 ６三銀(54)   (00:00/00:00:00)
  39 ８八玉(79)   (00:00/00:00:00)
  40 ５四銀(63)   (00:00/00:00:00)
  41 ２五歩(26)   (00:00/00:00:00)
  42 ６三銀(54)   (00:00/00:00:00)
  43 ６七銀(56)   (00:00/00:00:00)
*▲囲い：銀矢倉
  44 ５四銀(63)   (00:00/00:00:00)
  45 ５六歩(57)   (00:00/00:00:00)
  46 ４四歩(43)   (00:00/00:00:00)
  47 ５九飛(29)   (00:00/00:00:00)
  48 ３一玉(42)   (00:00/00:00:00)
  49 ５五歩(56)   (00:00/00:00:00)
  50 ４三銀(54)   (00:00/00:00:00)
  51 ５六銀(67)   (00:00/00:00:00)
  52 ２二玉(31)   (00:00/00:00:00)
*△囲い：銀矢倉
  53 ６九飛(59)   (00:00/00:00:00)
  54 ３一玉(22)   (00:00/00:00:00)
  55 ２九飛(69)   (00:00/00:00:00)
  56 ２二玉(31)   (00:00/00:00:00)
  57 ４五歩(46)   (00:00/00:00:00)
  58 ４五歩(44)   (00:00/00:00:00)
  59 ４五銀(56)   (00:00/00:00:00)
  60 ８六歩(85)   (00:00/00:00:00)
  61 ８六歩(87)   (00:00/00:00:00)
  62 ８五歩打     (00:00/00:00:00)
  63 ８五歩(86)   (00:00/00:00:00)
  64 ９五歩(94)   (00:00/00:00:00)
  65 ９五歩(96)   (00:00/00:00:00)
  66 ７五歩(74)   (00:00/00:00:00)
  67 ７五歩(76)   (00:00/00:00:00)
  68 ６五歩(64)   (00:00/00:00:00)
  69 ７六角打     (00:00/00:00:00)
  70 ５二金(62)   (00:00/00:00:00)
  71 ８六銀(77)   (00:00/00:00:00)
  72 ６六歩(65)   (00:00/00:00:00)
  73 ７七桂(89)   (00:00/00:00:00)
  74 ４四歩打     (00:00/00:00:00)
  75 ５六銀(45)   (00:00/00:00:00)
  76 ３五歩(34)   (00:00/00:00:00)
  77 ３五歩(36)   (00:00/00:00:00)
  78 ８五桂(73)   (00:00/00:00:00)
  79 ８五桂(77)   (00:00/00:00:00)
  80 ３六歩打     (00:00/00:00:00)
  81 ４五桂(37)   (00:00/00:00:00)
  82 ４五歩(44)   (00:00/00:00:00)
  83 ６四歩打     (00:00/00:00:00)
  84 ７二桂打     (00:00/00:00:00)
  85 ６三歩成(64) (00:00/00:00:00)
  86 ６三金(52)   (00:00/00:00:00)
  87 ４三角成(76) (00:00/00:00:00)
  88 ４三金(32)   (00:00/00:00:00)
  89 ５二銀打     (00:00/00:00:00)
  90 ７六角打     (00:00/00:00:00)
  91 ７七金(78)   (00:00/00:00:00)
  92 ８七歩打     (00:00/00:00:00)
  93 ８七金(77)   (00:00/00:00:00)
  94 ６七角打     (00:00/00:00:00)
  95 ６七銀(56)   (00:00/00:00:00)
  96 ８七角成(76) (00:00/00:00:00)
  97 ８七玉(88)   (00:00/00:00:00)
  98 ６七歩成(66) (00:00/00:00:00)
  99 ８九角打     (00:00/00:00:00)
 100 ６六と(67)   (00:00/00:00:00)
 101 ４三銀成(52) (00:00/00:00:00)
 102 ７六金打     (00:00/00:00:00)
 103 ８八玉(87)   (00:00/00:00:00)
 104 ８六金(76)   (00:00/00:00:00)
 105 ７九玉(88)   (00:00/00:00:00)
 106 ７七金(86)   (00:00/00:00:00)
 107 ６八歩打     (00:00/00:00:00)
 108 ６七銀打     (00:00/00:00:00)
 109 ６七角(89)   (00:00/00:00:00)
 110 ６七と(66)   (00:00/00:00:00)
 111 ３三全(43)   (00:00/00:00:00)
 112 ３三玉(22)   (00:00/00:00:00)
 113 ３四銀打     (00:00/00:00:00)
 114 ４四玉(33)   (00:00/00:00:00)
 115 ２二角打     (00:00/00:00:00)
 116 ３三銀打     (00:00/00:00:00)
 117 ３三銀(34)   (00:00/00:00:00)
 118 ５五玉(44)   (00:00/00:00:00)
 119 ３二銀(33)   (00:00/00:00:00)
 120 ６四玉(55)   (00:00/00:00:00)
 121 ７六桂打     (00:00/00:00:00)
 122 ７六金(77)   (00:00/00:00:00)
 123 ６七歩(68)   (00:00/00:00:00)
 124 ４六角打     (00:00/00:00:00)
 125 ５七銀打     (00:00/00:00:00)
 126 ５五桂打     (00:00/00:00:00)
 127 ５六銀打     (00:00/00:00:00)
 128 ８五飛(81)   (00:00/00:00:00)
 129 ４六銀(57)   (00:00/00:00:00)
 130 ７八銀打     (00:00/00:00:00)
 131 ７八玉(79)   (00:00/00:00:00)
 132 ６七桂成(55) (00:00/00:00:00)
 133 ６七銀(56)   (00:00/00:00:00)
 134 ８七飛成(85) (00:00/00:00:00)
 135 ７九玉(78)   (00:00/00:00:00)
 136 ６七金(76)   (00:00/00:00:00)
 137 ５五角成(22) (00:00/00:00:00)
 138 ７五玉(64)   (00:00/00:00:00)
 139 ６五金打     (00:00/00:00:00)
 140 ８五玉(75)   (00:00/00:00:00)
 141 ７七桂打     (00:00/00:00:00)
 142 ７六玉(85)   (00:00/00:00:00)
 143 ７五金(65)   (00:00/00:00:00)
 144 ７五玉(76)   (00:00/00:00:00)
 145 ６五馬(55)   (00:00/00:00:00)
 146 ８四玉(75)   (00:00/00:00:00)
 147 ８七馬(65)   (00:00/00:00:00)
 148 ６八銀打     (00:00/00:00:00)
 149 ８九玉(79)   (00:00/00:00:00)
 150 ７七銀成(68) (00:00/00:00:00)
 151 ８一飛打     (00:00/00:00:00)
 152 ８三桂打     (00:00/00:00:00)
 153 ８五歩打     (00:00/00:00:00)
 154 ７三玉(84)   (00:00/00:00:00)
 155 ７四歩打     (00:00/00:00:00)
 156 投了
まで155手で先手の勝ち
`
  },

  data() {
    return {
      kifu_body: null,
    }
  },

  components: {
    ShogiPlayer
  },
}
</script>

<style lang="sass">
body
  color: white ! important
  margin: 0
  padding: 0
  background: black ! important
  min-height: 100vh

#app
  font-family: 'Avenir', Helvetica, Arial, sans-serif
  -webkit-font-smoothing: antialiased
  -moz-osx-font-smoothing: grayscale
  text-align: center
  margin-top: 20px

.links
  margin-top: 1rem
</style>
