private List<Action> ParseActions(SimpleMessage message, Player player, Game game) { List<Action> actions = new List<Action>(); foreach (string line in message.BodyAsLines()) { Action action = null; if (player != null && game != null && game.IsInProgress) { action = ParseGameAction(line, player, game); } if (action == null) { action = ParseSystemAction(line); } if (action != null) actions.Add(action); } return actions; }