Minesweeper by Lost_dog

main=interact$f.lines
f s=unlines[[(s!!x!!y)#sum[1|i<-[x-1..x+1],j<-[y-1..y+1],i>=0,i<16,j>=0,j<16,s!!i!!j<'.']|y<-n]|x<-n]
'*'#_='*'
_#n=['0'..]!!n
n=[0..15]

Note that non-ascii characters in the above source code will be escaped (such as \x9f).

download

return to the top page