{"size": 344, "ext": "js", "max_stars_repo_path": "api/tests/routes/v1/util/array2bombMap.js", "max_stars_repo_name": "NaoRennie/mugensweeper", "max_stars_repo_stars_event_min_datetime": "2018-12-06T10:02:51.000Z", "max_stars_repo_stars_event_max_datetime": "2021-06-07T22:48:41.000Z", "max_issues_repo_path": "api/tests/routes/v1/util/array2bombMap.js", "max_issues_repo_name": "NaoRennie/mugensweeper", "max_issues_repo_issues_event_min_datetime": "2018-11-17T23:15:44.000Z", "max_issues_repo_issues_event_max_datetime": "2020-04-29T03:02:26.000Z", "max_forks_repo_path": "api/tests/routes/v1/util/array2bombMap.js", "max_forks_repo_name": "NaoRennie/mugensweeper", "max_forks_repo_forks_event_min_datetime": "2018-11-16T12:18:30.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-25T02:28:34.000Z"}
{"max_stars_count": 5, "max_issues_count": 354, "max_forks_count": 18, "avg_line_length": 22.9333333333, "max_line_length": 61, "alphanum_fraction": 0.4273255814}
module.exports = (array) => {
  const size = Math.sqrt(array.length);
  return array
    .map((p, idx) =>
      p !== 0
        ? {
            x: Math.floor(idx % size) - Math.floor(size / 2),
            y: Math.floor(size / 2) - Math.floor(idx / size),
            actionId: p,
          }
        : p,
    )
    .filter((p) => p !== 0);
};
