static void TryTest() { Console.WriteLine(testString); var ar = Tafel.FromString(testString); int x, y; //var pr = Tafel.PrüfRichtung(ar, out x, out y); var pr = Tafel.PrüfRichtungMitHinzufügen(ar, out x, out y); Console.WriteLine(pr); if (pr == 1 || pr == -1) { ZeigTafel(ar, pr, x, y); } }
// Update is called once per frame void Update() { if (startstring != "") { _ar = Tafel.FromString(startstring); startstring = ""; } if (regentex) { regentex = false; StartCoroutine("GenTex"); } if (l1) { l1 = false; _ar = Tafel.mitNiveau(1, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l2) { l2 = false; _ar = Tafel.mitNiveau(2, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l3) { l3 = false; _ar = Tafel.mitNiveau(3, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l4) { l4 = false; _ar = Tafel.mitNiveau(4, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l5) { l5 = false; _ar = Tafel.mitNiveau(5, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l6) { l6 = false; _ar = Tafel.mitNiveau(6, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l7) { l7 = false; _ar = Tafel.mitNiveau(7, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l8) { l8 = false; _ar = Tafel.mitNiveau(8, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l9) { l9 = false; _ar = Tafel.mitNiveau(9, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l10) { l10 = false; _ar = Tafel.mitNiveau(10, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l11) { l11 = false; _ar = Tafel.mitNiveau(11, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l12) { l12 = false; _ar = Tafel.mitNiveau(12, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l13) { l13 = false; _ar = Tafel.mitNiveau(13, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l14) { l14 = false; _ar = Tafel.mitNiveau(14, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (l15) { l15 = false; _ar = Tafel.mitNiveau(15, out _d, out _x, out _y); Debug.Log(Tafel.ToString(_ar)); } if (Input.GetKeyDown(KeyCode.P) && _ar != null) { _d = Tafel.PrüfRichtungMitHinzuhinzufügen(_ar, out _x, out _y); Debug.Log("PrüfRichtungMitHinzuhinzufügen " + _d); } var generate = -1; if (Input.GetKeyDown(KeyCode.N)) { generate = 1; } else if (Input.GetKeyDown(KeyCode.M)) { generate = 2; } else if (Input.GetKeyDown(KeyCode.Comma)) { generate = 3; } if (Input.GetKeyDown(KeyCode.Alpha1)) { density = 0.1f; } if (Input.GetKeyDown(KeyCode.Alpha2)) { density = 0.2f; } if (Input.GetKeyDown(KeyCode.Alpha3)) { density = 0.3f; } if (Input.GetKeyDown(KeyCode.Alpha4)) { density = 0.4f; } if (Input.GetKeyDown(KeyCode.Alpha5)) { density = 0.5f; } if (Input.GetKeyDown(KeyCode.Alpha6)) { density = 0.6f; } if (Input.GetKeyDown(KeyCode.Alpha7)) { density = 0.7f; } if (Input.GetKeyDown(KeyCode.Alpha8)) { density = 0.8f; } if (Input.GetKeyDown(KeyCode.Alpha9)) { density = 0.9f; } if (generate > 0) { Tafel.GenerateWithDensity(generate, density, out _d, out _x, out _y, false); } if (_ar != null) { ZeigTafel(_ar, _d, _x, _y); } }