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; }
/** * @return array flat array of keys */ public function getPieceControlledKeys(Piece $piece) { return $piece->getBasicTargetKeys(); }
public function add(Piece $piece) { $this->pieces[$piece->getSquareKey()] = $piece; }