Example from book Zechner M., Green R. - Beginning Android Games, 2nd Edition - 2012