Skip to content

Commit c713fd8

Browse files
committed
aaaabbb
1 parent c14ae56 commit c713fd8

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

packages/action/dist/index.js

+13-5
Original file line numberDiff line numberDiff line change
@@ -30894,6 +30894,13 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
3089430894
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
3089530895
}
3089630896
};
30897+
var __spreadArrays = (this && this.__spreadArrays) || function () {
30898+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
30899+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
30900+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
30901+
r[k] = a[j];
30902+
return r;
30903+
};
3089730904
exports.__esModule = true;
3089830905
exports.generateContributionSnake = exports.userContributionToGrid = void 0;
3089930906
var github_user_contribution_1 = __webpack_require__(1132);
@@ -30902,8 +30909,8 @@ var grid_1 = __webpack_require__(7202);
3090230909
var compute_1 = __webpack_require__(2869);
3090330910
var gif_creator_1 = __webpack_require__(7345);
3090430911
exports.userContributionToGrid = function (cells) {
30905-
var width = Math.max.apply(Math, cells.map(function (c) { return c.x; }));
30906-
var height = Math.max.apply(Math, cells.map(function (c) { return c.y; }));
30912+
var width = Math.max.apply(Math, __spreadArrays([0], cells.map(function (c) { return c.x; }))) + 1;
30913+
var height = Math.max.apply(Math, __spreadArrays([0], cells.map(function (c) { return c.y; }))) + 1;
3090730914
var grid = generateGrid_1.generateEmptyGrid(width, height);
3090830915
for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
3090930916
var c = cells_1[_i];
@@ -30936,8 +30943,8 @@ exports.generateContributionSnake = function (userName) { return __awaiter(void
3093630943
colorSnake: "purple",
3093730944
};
3093830945
gameOptions = { maxSnakeLength: 5 };
30939-
gifOptions = { delay: 20 };
30940-
commands = compute_1.computeBestRun(grid0, snake0, gameOptions).slice(0, 50);
30946+
gifOptions = { delay: 10 };
30947+
commands = compute_1.computeBestRun(grid0, snake0, gameOptions);
3094130948
return [4 /*yield*/, gif_creator_1.createGif(grid0, snake0, commands, drawOptions, gameOptions, gifOptions)];
3094230949
case 2:
3094330950
buffer = _b.sent();
@@ -41573,7 +41580,7 @@ exports.computeBestRun = function (grid, snake, options) {
4157341580
var s = snake_1.copySnake(snake);
4157441581
var q = [];
4157541582
var commands = [];
41576-
var u = 100;
41583+
var u = 500;
4157741584
while (!isGridEmpty(g) && u-- > 0) {
4157841585
var direction = void 0;
4157941586
for (var k = 10; k--;) {
@@ -41690,6 +41697,7 @@ var generateContributionSnake_1 = __webpack_require__(1981);
4169041697
switch (_a.label) {
4169141698
case 0:
4169241699
_a.trys.push([0, 2, , 3]);
41700+
console.log("argv", process.argv);
4169341701
console.log(core.getInput("user_name"));
4169441702
console.log(core.getInput("gif_out_path"));
4169541703
console.log("--");

0 commit comments

Comments
 (0)