Past Meetup

Coding Dojo: Minesweeper in your favourite programming language

This Meetup is past

10 people went

Location image of event venue

Details

Hey friends of the functional!

The idea for this meetup is based on an input I got from @sgoettschkes - he implemented a small coding kata - minesweeper - in haskell, and he wants to present it.

So I thought well I could implement this - to have a comparable solution, but I only know haskell and that's a bit boring so it would be nice to have as many different solutions as possible. Thus take your favorite programming language and implement this kata.

Test cases will be provided soon - i will create a github repo and link it in the comments.

Kata
-----

read in a minefield in the form

input.txt:
3 3
--x
-x-
x--

and produce a solution, a string showing the number of adjacent bombs for each field, in the form

solution.txt
1 2 B
2 B 2
B 2 1

note the whitespace between every field in the output, no adjacent bombs should be represented as whitespace in the string printout (so "---" => " ") .

If you want to you can of course use U+1F4A3 to represent the bomb and (if you want to make the output more nicely - using the box characters https://en.wikipedia.org/wiki/Box-drawing_character#Unicode)

So have fun
Martin

EDIT
===

Hey I want to change the format of this coming meetup - I want to have a Coding Dojo rather than a simple compare our solution meetup. So I decided to provide a new challenge atop of the existing solutions - and I would like to have you choose one of the existing solutions (not necessarily your own) and implement a solution to the problem.

This challenge I find particularly interesting as in real world scenarios one often has to work with already existing code of varying quality also one can learn to understand a new paradigm by just asking the one who wrote the unfamiliar solution within the meetup.

Whether you like to program in teams or alone is up to you.

Cheers Martin