private function generateMovesForBots()
    {
        foreach ($this->getPlayers() as &$player) {

            $last_move = $player->getLastMoveIndex();

            // generate move for bots
            if ($player->isBot() && empty($last_move)) {
                $move = $this->generateMove();
                $player->move($move);
            }
        }
        
        return $this;
    }
private function generateMovesForBots()
    {
        foreach ($this->getPlayers() as &$player) {

            $last_move = $player->getLastMoveIndex();

            // generate move for bots
            if ($player->isBot() && empty($last_move)) {
                $move = $this->generateMove();
                $player->move($move);
            }
        }
        
        return $this;
    }
private function generateMovesForBots ( ) { foreach ( $ this -> getPlayers ( ) as & $ player ) { $ last_move = $ player -> getLastMoveIndex ( ) ; // generate move for bots if ( $ player -> isBot ( ) && empty ( $ last_move ) ) { $ move = $ this -> generateMove ( ) ; $ player -> move ( $ move ) ; } } return $ this ; }
Generate Moves For Bots
@return $this
Generate Moves For Bots