private function calculateMoveScore($player, array $position)
    {
        if ($this->board->getValue($position)) {
            return null;
        }

        $totalScore = 0;

        foreach ($this->positions as $row) {

            if (!in_array($position, $row)) {
                continue;
            }

            $countOpponentMoves = 0;
            $countPlayerMoves = 0;

            foreach ($row as $positionTile) {

                $positionValue = $this->board->getValue($positionTile);
                if ($positionValue) {

                    $countOpponentMoves++;

                    if ($positionValue == $player) {
                        $countPlayerMoves++;

                        $countOpponentMoves--;
                    }

                }

            }


            if (!$countOpponentMoves && $countPlayerMoves == 2) {
                $totalScore += 10;
                continue;

            }
            if (!$countOpponentMoves && $countPlayerMoves == 1) {
                $totalScore += 2;
                continue;

            }
            if (!$countOpponentMoves && !$countPlayerMoves) {
                $totalScore++;
                continue;
            }
        }
        return $totalScore;
    }