Minesweeper by matyr (2hrs)

for($='';_=readline();)$+=_+'\n'
print($.replace(/\./g,function(_,i)[n+=$[i+j]=='*'for each(j in n=0,[-18,-17,-16,-1,1,16,17,18])][7]))

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

download

return to the top page