[HN Gopher] Exercise: Minesweeper in 100 lines of Ruby
       ___________________________________________________________________
        
       Exercise: Minesweeper in 100 lines of Ruby
        
       Author : damir
       Score  : 30 points
       Date   : 2024-07-20 18:45 UTC (4 hours ago)
        
 (HTM) web link (radanskoric.com)
 (TXT) w3m dump (radanskoric.com)
        
       | igor47 wrote:
       | Cool! Mine sweeper is a really fun easy game to implement. I did
       | a version in Python a few years ago:
       | https://github.com/igor47/sweeper but mine is closer to 500 lines
        
         | darthg0d wrote:
         | Ditto. I did the same with GoLang a couple of years back, but
         | didn't aim for clean/terse code: https://github.com/jedib0t/go-
         | mines
        
       | henning wrote:
       | The stupid thing about object-oriented programming and modern
       | software is that code like this would never make it through code
       | review on an "agile" team.
       | 
       | - "Oh, why are you doing procedural case statements? that's a
       | SOLID anti-pattern, please refactor to polymorphism"
       | 
       | - "Oh, why is the Ascii Renderer class meddling in cell mine
       | logic? `cell.neighbour_mines.zero? ? "_" : cell.neighbour_mines`
       | should be its own method in a `Mine` class that is properly
       | tested"
       | 
       | You're never allowed to just write code that solves a problem. It
       | never ends. Your team has unlimited authority to slow you down
       | with completely useless "feedback" that does not help anyone.
        
       ___________________________________________________________________
       (page generated 2024-07-20 23:03 UTC)