Exemplo n.º 1
0
 protected function pieceToForsythe(Piece $piece)
 {
     $class = $piece->getClass();
     if ('Knight' === $class) {
         $notation = 'N';
     } else {
         $notation = $class[0];
     }
     if ('black' === $piece->getColor()) {
         $notation = strtolower($notation);
     }
     return $notation;
 }
Exemplo n.º 2
0
 /**
  * @return array flat array of keys
  */
 public function getPieceControlledKeys(Piece $piece)
 {
     return $piece->getBasicTargetKeys();
 }
Exemplo n.º 3
0
 public function add(Piece $piece)
 {
     $this->pieces[$piece->getSquareKey()] = $piece;
 }