# File lib/libpplayer.rb, line 54
  def score_position(game, player)
    score = 0
    game.pieces.each_value do |piece|
      here = piece.position
      if piece.colour == player
        game.pieces.each_value do |other_piece|
          if other_piece.colour == player
            score += game.board.distance_between[here.place][other_piece.position.place] * @friend_pull
          else
            score += game.board.distance_between[here.place][other_piece.position.place] * @enemy_pull
          end
        end
        score += piece.contains.length * @capture_bonus
        score += game.board.distance_between[here.place][game.board.positions[player].place] * 
        piece.contains.length * @base_pull
      elsif here == game.board.positions[player]
        score += @safe_bonus
      end
    end
    score
  end