Exemple #1
0
            public static void MoveDown(int[,] field)
            {
                if (Evil.x - Player.x < 0)
                {
                    switch (field[Evil.x + 1, Evil.y])
                    {
                    case 3:
                        Evil.ExitWall(field);
                        break;

                    case 4:
                        Evil.Level           += 1;
                        field[Evil.x, Evil.y] = 9;
                        Evil.x += 1;
                        break;

                    default:
                        field[Evil.x, Evil.y] = 9;
                        Evil.x += 1;
                        break;
                    }
                }
            }
Exemple #2
0
            public static void MoveLeft(int[,] field)
            {
                if (Evil.y - Player.y > 0)
                {
                    switch (field[Evil.x, Evil.y - 1])
                    {
                    case 3:
                        Evil.ExitWall(field);
                        break;

                    case 4:
                        Evil.Level           += 1;
                        field[Evil.x, Evil.y] = 9;
                        Evil.y -= 1;
                        break;

                    default:
                        field[Evil.x, Evil.y] = 9;
                        Evil.y -= 1;
                        break;
                    }
                }
            }