The full source code for SnailBait - an HTML5 game discussed at length in Core HTML5 2D Game Programming, published by Prentice-Hall in 2014.