From e5a33f1e36c05f7f50c7b21ef43d4d455484e50d Mon Sep 17 00:00:00 2001 From: Alex Lohr Date: Thu, 28 Nov 2024 09:56:56 +0100 Subject: [PATCH] address PR comments --- config.json | 8 ++++++++ exercises/practice/game-of-life/.meta/config.json | 2 +- .../game-of-life/.meta/{game-of-life.wat => proof.ci.wat} | 5 +++-- exercises/practice/game-of-life/game-of-life.wat | 5 +++-- 4 files changed, 15 insertions(+), 5 deletions(-) rename exercises/practice/game-of-life/.meta/{game-of-life.wat => proof.ci.wat} (94%) diff --git a/config.json b/config.json index 2d0bd0f..4ce4f73 100644 --- a/config.json +++ b/config.json @@ -303,6 +303,14 @@ "prerequisites": [], "difficulty": 6 }, + { + "slug": "game-of-life", + "name": "Game Of Life", + "uuid": "d6f05d17-49b9-42de-b2fa-d2cc7c5ca11f", + "practices": [], + "prerequisites": [], + "difficulty": 7 + }, { "slug": "minesweeper", "name": "Minesweeper", diff --git a/exercises/practice/game-of-life/.meta/config.json b/exercises/practice/game-of-life/.meta/config.json index 4eca152..7f8235d 100644 --- a/exercises/practice/game-of-life/.meta/config.json +++ b/exercises/practice/game-of-life/.meta/config.json @@ -10,7 +10,7 @@ "game-of-life.spec.js" ], "example": [ - ".meta/game-of-life.wat" + ".meta/proof.ci.wat" ], "invalidator": [ "package.json" diff --git a/exercises/practice/game-of-life/.meta/game-of-life.wat b/exercises/practice/game-of-life/.meta/proof.ci.wat similarity index 94% rename from exercises/practice/game-of-life/.meta/game-of-life.wat rename to exercises/practice/game-of-life/.meta/proof.ci.wat index 2dc4b4c..99a12f4 100644 --- a/exercises/practice/game-of-life/.meta/game-of-life.wat +++ b/exercises/practice/game-of-life/.meta/proof.ci.wat @@ -5,9 +5,10 @@ ;; Create the next frame of Conway's Game of Life ;; ;; @param {i32} offset - The offset of the current frame in linear memory - ;; @param {i32} length - The length of the current frame in linear memory + ;; @param {i32} cols - The number of columns in the frame + ;; @param {i32} rows - The number of rows in the frame ;; - ;; @returns {(i32,i32)} - The offset and length of the next frame in linear memory + ;; @returns {i32} - The offset of the next frame in linear memory ;; (func (export "next") (param $offset i32) (param $cols i32) (param $rows i32) (result i32) (local $pos i32) (local $nbpos i32) (local $length i32) (local $count i32) (local $edges i32) (local $bottom i32) diff --git a/exercises/practice/game-of-life/game-of-life.wat b/exercises/practice/game-of-life/game-of-life.wat index 42af87d..1d65767 100644 --- a/exercises/practice/game-of-life/game-of-life.wat +++ b/exercises/practice/game-of-life/game-of-life.wat @@ -5,9 +5,10 @@ ;; Create the next frame of Conway's Game of Life ;; ;; @param {i32} offset - The offset of the current frame in linear memory - ;; @param {i32} length - The length of the current frame in linear memory + ;; @param {i32} cols - The number of columns in the frame + ;; @param {i32} rows - The number of rows in the frame ;; - ;; @returns {(i32,i32)} - The offset and length of the next frame in linear memory + ;; @returns {i32} - The offset of the next frame in linear memory ;; (func (export "next") (param $offset i32) (param $cols i32) (param $rows i32) (result i32) (return (local.get $offset))