The book was "A Theory Of Fun For Game Design" by Raph Koster. It is a very well written, easy-to-read material on how human perception works, what do people consider being fun, how games can be fun and finally how to design games right.
I felt like it's very important to not forget about these things, so I wrote down some of the most important excerpts and took notes. Naturally, if you're interested, I highly recommend reading the whole thing and hopefully this post will not turn out as a copyright infringement of some sort. Here it goes: