import Shogi from '../shogi';

Shogi.Piece = class Piece {
  constructor(type, x, y) {
    this.type = type;
    this.x = x;
    this.y = y;
  }
};

@@ -137,12 +137,341 @@
 = y;%0A  %7D
+%0A%0A  promote() %7B%0A    this.type = this.usiPromoteTypes(this.type) %7C%7C this.type;%0A    return this.type;%0A  %7D%0A%0A  usiPromoteTypes() %7B%0A    return %7B%0A      p: 'p+',%0A      l: 'l+',%0A      n: 'n+',%0A      s: 's+',%0A      b: 'b+',%0A      r: 'r+',%0A      P: 'P+',%0A      L: 'L+',%0A      N: 'N+',%0A      S: 'S+',%0A      B: 'B+',%0A      R: 'R+'%0A    %7D;%0A  %7D
 %0A%7D;%0A

Define promote method in Shogi.Piece