/// <summary> /// Register the snake in the Snakes list /// </summary> /// <param name="snake"></param> /// <returns></returns> public static bool RegisterSnakeScript(Snake snake) { if (Snakes == null) { Snakes = new List <Snake>(4); } if (snake == null || Snakes.Contains(snake)) { return(false); } Snakes.Add(snake); Snakes = Snakes.OrderBy(s => s.GetActorIDOfCreator()).ToList(); return(true); }