greedy snake written in swift