Exemplo n.º 1
0
 /**
  * @param BoardInterface $board
  *
  * @return array
  */
 private function getExpectedBoardArray(BoardInterface $board)
 {
     $squares = [];
     foreach ($board->getSquares() as $square) {
         $squares[$square->getPosition()] = ['position' => $square->getPosition(), 'color' => $square->getColor(), 'piece' => $this->getExpectedPieceArray($square->getPiece())];
     }
     return ['squares' => $squares];
 }