private static void MoveIvo(IVO ivo, int[,] matrix) { while (ivo.Row >= 0) { if (ivo.Row < matrix.GetLength(0) && ivo.Col >= 0 && ivo.Col < matrix.GetLength(1)) { ivo.CollectPoints(matrix[ivo.Row, ivo.Col]); } ivo.UpdateCoordinates(ivo.Row - 1, ivo.Col + 1); } }
private static void UpdateCoordinates(string command, IVO ivo, EVIL evil) { var ivoCoordinates = command .Split(' ') .Select(int.Parse) .ToArray(); ivo.UpdateCoordinates(ivoCoordinates[0], ivoCoordinates[1]); command = Console.ReadLine(); var evilCoordinates = command .Split(' ') .Select(int.Parse) .ToArray(); evil.UpdateCoordinates(evilCoordinates[0], evilCoordinates[1]); }