public void Sample() { OneLookLLCube cube = new OneLookLLCube(); cube.Solve(); cube.SetUpPosition(3776); int posNum = cube.GetPosNum(); Assert.AreEqual(3776, posNum, "failed no auf"); cube.Solve(); cube.SetUpPosition(3776); cube.U(); posNum = cube.GetPosNum(); Assert.AreEqual(3776, posNum, "failed U"); cube.Solve(); cube.SetUpPosition(3776); cube.U2(); posNum = cube.GetPosNum(); Assert.AreEqual(3776, posNum, "failed U2"); cube.Solve(); cube.SetUpPosition(3776); cube.Ui(); posNum = cube.GetPosNum(); Assert.AreEqual(3776, posNum, "failed U'"); }
public void DifferentAngle() { OneLookLLCube cube = new OneLookLLCube(); cube.Solve(); cube.SetUpPosition(447); cube.U2(); int num = cube.GetPosNum(); Assert.AreEqual(447, num); }
public void HCaseTests() { OneLookLLCube cube = new OneLookLLCube(); for (int k = 3552; k < 3776; k++) { cube.Solve(); cube.SetUpPosition(k); //cube.RandomUMove(); int posNum = cube.GetPosNum(); Assert.AreEqual(k, posNum, "failed on position " + k); } }
public void DotTests() { OneLookLLCube cube = new OneLookLLCube(); for (int k = 480; k < 960; k++) { cube.Solve(); cube.SetUpPosition(k); cube.Ui(); int posNum = cube.GetPosNum(); Assert.AreEqual(k, posNum, "failed on position " + k); } }
/// <summary> /// Sends an ELLCP position number back to the client /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SetUpEllcpButton_Click(object sender, EventArgs e) { if (!Cube.IsEllcp()) { MessageBox.Show("Not a valid ELLCP position", "error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var cube = new OneLookLLCube(Cube.Stickers); int posNum = cube.GetPosNum(); _callback(AlgSet.ELLCP, posNum - 3776); this.Close(); }
/// <summary> /// Sends a 1LLL position number back to the client /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SetUp1lllButton_Click(object sender, EventArgs e) { if (!Cube.Is1lll()) { MessageBox.Show("PLL not allowed", "error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } var cube = new OneLookLLCube(Cube.Stickers); int posNum = cube.GetPosNum(); _callback(AlgSet.OneLookLL, posNum); this.Close(); }
public void OneLookTests() { OneLookLLCube cube = new OneLookLLCube(); for (int k = 0; k < cube.GetNumPositions(); k++) { cube.Solve(); cube.SetUpPosition(k); if (!((k >= 460 && k < 480) || (k >= 940 && k < 980))) { cube.RandomUMove(); } int posNum = cube.GetPosNum(); Assert.AreEqual(k, posNum, "failed on position " + k); } }