public void AssignmentMustWorkForRec15() { var t = _.t(new B0(), new B1(), new B2(), new B3(), new B4(), new B5(), new B6(), new B7(), new B8(), new B9(), new B10(), new B11(), new B12(), new B13(), new B14()); A0 a0 = t._1; A1 a1 = t._2; A2 a2 = t._3; A3 a3 = t._4; A4 a4 = t._5; A5 a5 = t._6; A6 a6 = t._7; A7 a7 = t._8; A8 a8 = t._9; A9 a9 = t._10; A10 a10 = t._11; A11 a11 = t._12; A12 a12 = t._13; A13 a13 = t._14; A14 a14 = t._15; Assert.NotNull(a0); Assert.NotNull(a1); Assert.NotNull(a2); Assert.NotNull(a3); Assert.NotNull(a4); Assert.NotNull(a5); Assert.NotNull(a6); Assert.NotNull(a7); Assert.NotNull(a8); Assert.NotNull(a9); Assert.NotNull(a10); Assert.NotNull(a11); Assert.NotNull(a12); Assert.NotNull(a13); Assert.NotNull(a14); }
public void AssignmentMustWorkForRec23() { var t = _.t(new B0(), new B1(), new B2(), new B3(), new B4(), new B5(), new B6(), new B7(), new B8(), new B9(), new B10(), new B11(), new B12(), new B13(), new B14(), new B15(), new B16(), new B17(), new B18(), new B19(), new B20(), new B21(), new B22()); A0 a0 = t._1; A1 a1 = t._2; A2 a2 = t._3; A3 a3 = t._4; A4 a4 = t._5; A5 a5 = t._6; A6 a6 = t._7; A7 a7 = t._8; A8 a8 = t._9; A9 a9 = t._10; A10 a10 = t._11; A11 a11 = t._12; A12 a12 = t._13; A13 a13 = t._14; A14 a14 = t._15; A15 a15 = t._16; A16 a16 = t._17; A17 a17 = t._18; A18 a18 = t._19; A19 a19 = t._20; A20 a20 = t._21; A21 a21 = t._22; A22 a22 = t._23; Assert.NotNull(a0); Assert.NotNull(a1); Assert.NotNull(a2); Assert.NotNull(a3); Assert.NotNull(a4); Assert.NotNull(a5); Assert.NotNull(a6); Assert.NotNull(a7); Assert.NotNull(a8); Assert.NotNull(a9); Assert.NotNull(a10); Assert.NotNull(a11); Assert.NotNull(a12); Assert.NotNull(a13); Assert.NotNull(a14); Assert.NotNull(a15); Assert.NotNull(a16); Assert.NotNull(a17); Assert.NotNull(a18); Assert.NotNull(a19); Assert.NotNull(a20); Assert.NotNull(a21); Assert.NotNull(a22); }
public static int[,] Multiply(this int[,] a, int[,] b) { // check if the task canceled from UI //if (pingpongalgorithmnew.current_token.iscancellationrequested) //{ // throw new taskcanceledexception("task canceled"); //} //if (a.GetLength(0) == 2) //{ // int[,] data = new int[2, 2]; // data[0, 0] = a[0, 0] * b[0, 0] + a[0, 1] * b[1, 0]; // data[0, 1] = a[0, 0] * b[0, 1] + a[0, 1] * b[1, 1]; // data[1, 0] = a[1, 0] * b[0, 0] + a[1, 1] * b[1, 0]; // data[1, 1] = a[1, 0] * b[0, 1] + a[1, 1] * b[1, 1]; // return data; //} if (a.GetLength(0) < 64) { return(a.NaiveMultiplication(b)); } (int[,] A11, int[,] A12, int[,] A21, int[,] A22) = a.divide(); (int[,] B11, int[,] B12, int[,] B21, int[,] B22) = b.divide(); //M1 = multiplication((A11 + A22), (B11 + B22)) int[,] M1 = (A11.Add(A22)).Multiply(B11.Add(B22)); //M2 = multiplication((A21 + A22), B11) int[,] M2 = (A21.Add(A22)).Multiply(B11); //M3 = multiplication(A11, (B12 - B22)) int[,] M3 = A11.Multiply(B12.Subtrac(B22)); //M4 = multiplication(A22, (B21 - B11)) int[,] M4 = A22.Multiply(B21.Subtrac(B11)); //M5 = multiplication((A11 + A12), B22) int[,] M5 = (A11.Add(A12)).Multiply(B22); //M6 = multiplication((A21 - A11), (B11 + B12)) int[,] M6 = (A21.Subtrac(A11)).Multiply(B11.Add(B12)); //M7 = multiplication((A12 - A22), (B21 + B22)) int[,] M7 = (A12.Subtrac(A22)).Multiply(B21.Add(B22)); //C11 = M1 + M4 - M5 + M7 int[,] C11 = M1.Add(M4).Subtrac(M5).Add(M7); //C12 = M3 + M5 int[,] C12 = M3.Add(M5); //C21 = M2 + M4 int[,] C21 = M2.Add(M4); //C22 = M1 - M2 + M3 + M6 int[,] C22 = M1.Subtrac(M2).Add(M3).Add(M6); return(combine(C11, C12, C21, C22, a.GetLength(0))); }
/// <summary> /// Saves a world file /// </summary> /// <param name="file">The filename</param> /// <exception cref="ArgumentNullException"/> public void Save(string file) { if (string.IsNullOrEmpty(file)) { throw new ArgumentNullException("file"); } using (var sw = new StreamWriter(file)) { sw.WriteLine(A11.ToString("R", NumberFormatInfo.InvariantInfo)); sw.WriteLine(A21.ToString("R", NumberFormatInfo.InvariantInfo)); sw.WriteLine(A12.ToString("R", NumberFormatInfo.InvariantInfo)); sw.WriteLine(A22.ToString("R", NumberFormatInfo.InvariantInfo)); sw.WriteLine(B1.ToString("R", NumberFormatInfo.InvariantInfo)); sw.WriteLine(B2.ToString("R", NumberFormatInfo.InvariantInfo)); } }
public override int GetHashCode() { var hashCode = -929212920; hashCode = hashCode * -1521134295 + EqualityComparer <double[, ]> .Default.GetHashCode(matrix); hashCode = hashCode * -1521134295 + A11.GetHashCode(); hashCode = hashCode * -1521134295 + A12.GetHashCode(); hashCode = hashCode * -1521134295 + A13.GetHashCode(); hashCode = hashCode * -1521134295 + A21.GetHashCode(); hashCode = hashCode * -1521134295 + A22.GetHashCode(); hashCode = hashCode * -1521134295 + A23.GetHashCode(); hashCode = hashCode * -1521134295 + A31.GetHashCode(); hashCode = hashCode * -1521134295 + A32.GetHashCode(); hashCode = hashCode * -1521134295 + A33.GetHashCode(); return(hashCode); }
private void hideEverything() { A00.Hide(); A01.Hide(); A02.Hide(); A10.Hide(); A11.Hide(); A12.Hide(); A20.Hide(); A21.Hide(); A22.Hide(); lbl_actualPlayer.Hide(); lbl_draw.Hide(); lbl_X.Hide(); lbl_Y.Hide(); bttn_changeName.Hide(); bttn_newGame.Hide(); bttn_reset.Hide(); bttn_close.Hide(); }
// Use this for initialization void Start() { PlayerIcon.GetComponent <SpriteRenderer>().enabled = true; A1.GetComponent <SpriteRenderer>().enabled = false; A2.GetComponent <SpriteRenderer>().enabled = false; A3.GetComponent <SpriteRenderer>().enabled = false; A4.GetComponent <SpriteRenderer>().enabled = false; A5.GetComponent <SpriteRenderer>().enabled = false; A6.GetComponent <SpriteRenderer>().enabled = false; A7.GetComponent <SpriteRenderer>().enabled = false; A8.GetComponent <SpriteRenderer>().enabled = false; A9.GetComponent <SpriteRenderer>().enabled = false; A10.GetComponent <SpriteRenderer>().enabled = false; A11.GetComponent <SpriteRenderer>().enabled = false; B1.GetComponent <SpriteRenderer>().enabled = false; B2.GetComponent <SpriteRenderer>().enabled = false; B3.GetComponent <SpriteRenderer>().enabled = false; B4.GetComponent <SpriteRenderer>().enabled = false; B5.GetComponent <SpriteRenderer>().enabled = false; B6.GetComponent <SpriteRenderer>().enabled = false; B7.GetComponent <SpriteRenderer>().enabled = false; B8.GetComponent <SpriteRenderer>().enabled = false; B9.GetComponent <SpriteRenderer>().enabled = false; B10.GetComponent <SpriteRenderer>().enabled = false; B11.GetComponent <SpriteRenderer>().enabled = false; C1.GetComponent <SpriteRenderer>().enabled = false; C2.GetComponent <SpriteRenderer>().enabled = false; C3.GetComponent <SpriteRenderer>().enabled = false; C4.GetComponent <SpriteRenderer>().enabled = false; C5.GetComponent <SpriteRenderer>().enabled = false; C6.GetComponent <SpriteRenderer>().enabled = false; C7.GetComponent <SpriteRenderer>().enabled = false; C8.GetComponent <SpriteRenderer>().enabled = false; C9.GetComponent <SpriteRenderer>().enabled = false; C10.GetComponent <SpriteRenderer>().enabled = false; C11.GetComponent <SpriteRenderer>().enabled = false; D1.GetComponent <SpriteRenderer>().enabled = false; D2.GetComponent <SpriteRenderer>().enabled = false; D3.GetComponent <SpriteRenderer>().enabled = false; D4.GetComponent <SpriteRenderer>().enabled = false; D5.GetComponent <SpriteRenderer>().enabled = false; D6.GetComponent <SpriteRenderer>().enabled = false; D7.GetComponent <SpriteRenderer>().enabled = false; D8.GetComponent <SpriteRenderer>().enabled = false; D9.GetComponent <SpriteRenderer>().enabled = false; D10.GetComponent <SpriteRenderer>().enabled = false; D11.GetComponent <SpriteRenderer>().enabled = false; E1.GetComponent <SpriteRenderer>().enabled = false; E2.GetComponent <SpriteRenderer>().enabled = false; E3.GetComponent <SpriteRenderer>().enabled = false; E4.GetComponent <SpriteRenderer>().enabled = false; E5.GetComponent <SpriteRenderer>().enabled = false; E6.GetComponent <SpriteRenderer>().enabled = false; E7.GetComponent <SpriteRenderer>().enabled = false; E8.GetComponent <SpriteRenderer>().enabled = false; E9.GetComponent <SpriteRenderer>().enabled = false; E10.GetComponent <SpriteRenderer>().enabled = false; E11.GetComponent <SpriteRenderer>().enabled = false; F1.GetComponent <SpriteRenderer>().enabled = false; F2.GetComponent <SpriteRenderer>().enabled = false; F3.GetComponent <SpriteRenderer>().enabled = false; F4.GetComponent <SpriteRenderer>().enabled = false; F5.GetComponent <SpriteRenderer>().enabled = false; F6.GetComponent <SpriteRenderer>().enabled = false; F7.GetComponent <SpriteRenderer>().enabled = false; F8.GetComponent <SpriteRenderer>().enabled = false; F9.GetComponent <SpriteRenderer>().enabled = false; F10.GetComponent <SpriteRenderer>().enabled = false; F11.GetComponent <SpriteRenderer>().enabled = false; G1.GetComponent <SpriteRenderer>().enabled = false; G2.GetComponent <SpriteRenderer>().enabled = false; G3.GetComponent <SpriteRenderer>().enabled = false; G4.GetComponent <SpriteRenderer>().enabled = false; G5.GetComponent <SpriteRenderer>().enabled = false; G6.GetComponent <SpriteRenderer>().enabled = false; G7.GetComponent <SpriteRenderer>().enabled = false; G8.GetComponent <SpriteRenderer>().enabled = false; G9.GetComponent <SpriteRenderer>().enabled = false; G10.GetComponent <SpriteRenderer>().enabled = false; G11.GetComponent <SpriteRenderer>().enabled = false; H1.GetComponent <SpriteRenderer>().enabled = false; H2.GetComponent <SpriteRenderer>().enabled = false; H3.GetComponent <SpriteRenderer>().enabled = false; H4.GetComponent <SpriteRenderer>().enabled = false; H5.GetComponent <SpriteRenderer>().enabled = false; H6.GetComponent <SpriteRenderer>().enabled = false; H7.GetComponent <SpriteRenderer>().enabled = false; H8.GetComponent <SpriteRenderer>().enabled = false; H9.GetComponent <SpriteRenderer>().enabled = false; H10.GetComponent <SpriteRenderer>().enabled = false; H11.GetComponent <SpriteRenderer>().enabled = false; I1.GetComponent <SpriteRenderer>().enabled = false; I2.GetComponent <SpriteRenderer>().enabled = false; I3.GetComponent <SpriteRenderer>().enabled = false; I4.GetComponent <SpriteRenderer>().enabled = false; I5.GetComponent <SpriteRenderer>().enabled = false; I6.GetComponent <SpriteRenderer>().enabled = false; I7.GetComponent <SpriteRenderer>().enabled = false; I8.GetComponent <SpriteRenderer>().enabled = false; I9.GetComponent <SpriteRenderer>().enabled = false; I10.GetComponent <SpriteRenderer>().enabled = false; I11.GetComponent <SpriteRenderer>().enabled = false; J1.GetComponent <SpriteRenderer>().enabled = false; J2.GetComponent <SpriteRenderer>().enabled = false; J3.GetComponent <SpriteRenderer>().enabled = false; J4.GetComponent <SpriteRenderer>().enabled = false; J5.GetComponent <SpriteRenderer>().enabled = false; J6.GetComponent <SpriteRenderer>().enabled = false; J7.GetComponent <SpriteRenderer>().enabled = false; J8.GetComponent <SpriteRenderer>().enabled = false; J9.GetComponent <SpriteRenderer>().enabled = false; J10.GetComponent <SpriteRenderer>().enabled = false; J11.GetComponent <SpriteRenderer>().enabled = false; K1.GetComponent <SpriteRenderer>().enabled = false; K2.GetComponent <SpriteRenderer>().enabled = false; K3.GetComponent <SpriteRenderer>().enabled = false; K4.GetComponent <SpriteRenderer>().enabled = false; K5.GetComponent <SpriteRenderer>().enabled = false; K6.GetComponent <SpriteRenderer>().enabled = false; K7.GetComponent <SpriteRenderer>().enabled = false; K8.GetComponent <SpriteRenderer>().enabled = false; K9.GetComponent <SpriteRenderer>().enabled = false; K10.GetComponent <SpriteRenderer>().enabled = false; K11.GetComponent <SpriteRenderer>().enabled = false; float ratio = Screen.width / Screen.height; if (ratio < 2) { int screenx = 543; int screeny = 653; } else { int screenx = 743; int screeny = 853; } }
public B(A11 a12) { }