In this article, I want to demonstrate a nice way to write functional-style code in Ruby. It is a way to write non-trivial pure functions, without a bunch of weird non-idiomatic code. Also, the acronym is PFAAO, which I think sounds pretty cool.
Today I live-streamed the making of Fruity Bat (a Flappy Bird clone) in Ruby using the
gosu gem. Watch the videos below, and check out the code on github: https://github.com/tomdalling/fruity_bat