Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 865 Bytes

README.md

File metadata and controls

28 lines (19 loc) · 865 Bytes

Game of Life - No Conditionals

An aggressive attempt at avoiding all advice about anything...

Conway's Game of Life, the classic problem to tackle in a code retreat, solved without the use of conditionals.

The Four Rules of simple Design almost apply:

  • The tests pass (or the test passes to be precise)
  • Code is fairly small, the number of classes could be hardly smaller, methods are short and not very numerous
  • Few repetitions
  • Naming is mostly comprehensible, although arguably that point will almost always lead to controversy

And yet... something seems strange.

A bonus

A tiny bonus for those who preach that code coverage alone would be a metric for quality. The test has huge coverage - but no benefit at all.

Why?

Because after all, it is a fun solution.


Disclaimer: All alliterations are accidental.