Skip to content

A Game of Life implementation without conditionals - worst hack ever.

License

Notifications You must be signed in to change notification settings

Silent-Fred/LifeCanBeFun

Repository files navigation

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.

About

A Game of Life implementation without conditionals - worst hack ever.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages