Skip to content

Commit

Permalink
address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
atk committed Dec 9, 2024
1 parent ba00596 commit e5a33f1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
8 changes: 8 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion exercises/practice/game-of-life/.meta/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"game-of-life.spec.js"
],
"example": [
".meta/game-of-life.wat"
".meta/proof.ci.wat"
],
"invalidator": [
"package.json"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 3 additions & 2 deletions exercises/practice/game-of-life/game-of-life.wat
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit e5a33f1

Please sign in to comment.