Arc Forumnew | comments | leaders | submitlogin
Minesweeper.arc (cornell.edu)
5 points by zck 3187 days ago | 2 comments


1 point by zck 3187 days ago | link

So, while procrastinating from my Y Combinator application, I finished my arc implementation of Minesweeper. It's pretty basic, but in the spirit of "release early", here it is!

You can't mark spaces as bombs, and it doesn't tell you if you've won. It also doesn't ensure your first click is not on a bomb.

Start a game by calling (create-mines rows cols mines), replacing each starred variable by an integer.

Pick a cell to reveal by calling (pick minefield mask row *col), replacing each starred variable with an integer.

I'm fairly new to Lisp (and Arc), so if there's anything I could be doing better, please let me know. I'd love to hear your comments about this.

-----

1 point by zck 3187 days ago | link

Ah, I posted this and ran away too quickly -- I didn't realize this forum uses markdown, or something similar.

Call (create-mines rows cols mines) like (create-mines 9 9 10), to play with a 9 by 9 field with 10 mines.

Call (pick minefield mask row *col) like (pick minefield mask 4 8), to pick the 4th row, 8th column in minefield.

-----