591 if (tier == 2) {
return; }
593 int i = (axis ==
'x') ? 0 : ((axis ==
'y') ? 1 : 2);
602 int i09 = 9 - i * ( 6 * i - 10);
603 int i21 = 21 - i * ( 3 * i + 7) / 2;
604 int i12 = 12 + i * (15 * i - 31) / 2;
606 int i01 = 1 - i * ( 3 * i - 5) / 2;
607 int i10 = 10 - i * (15 * i - 23) / 2;
608 int i22 = 22 - i * ( 3 * i + 2);
609 int i13 = 13 + i * ( 6 * i - 14);
611 int i02 = 2 + i * ( 3 * i - 7) / 2;
612 int i11 = 11 - i * ( 9 * i - 11) / 2;
613 int i23 = 23 - 8 * i;
614 int i14 = 14 + i * ( 9 * i - 20);
620 std::swap(rubik.corn_[i09], rubik.corn_[i00]);
621 std::swap(rubik.corn_[i21], rubik.corn_[i09]);
622 std::swap(rubik.corn_[i12], rubik.corn_[i21]);
625 std::swap(rubik.corn_[i11], rubik.corn_[i01]);
626 std::swap(rubik.corn_[i22], rubik.corn_[i11]);
627 std::swap(rubik.corn_[i14], rubik.corn_[i22]);
630 std::swap(rubik.corn_[i10], rubik.corn_[i02]);
631 std::swap(rubik.corn_[i23], rubik.corn_[i10]);
632 std::swap(rubik.corn_[i13], rubik.corn_[i23]);
636 std::swap(rubik.corn_[i00], rubik.corn_[i21]);
637 std::swap(rubik.corn_[i09], rubik.corn_[i12]);
638 std::swap(rubik.corn_[i01], rubik.corn_[i22]);
639 std::swap(rubik.corn_[i11], rubik.corn_[i14]);
640 std::swap(rubik.corn_[i02], rubik.corn_[i23]);
641 std::swap(rubik.corn_[i10], rubik.corn_[i13]);
645 std::swap(rubik.corn_[i12], rubik.corn_[i00]);
646 std::swap(rubik.corn_[i21], rubik.corn_[i12]);
647 std::swap(rubik.corn_[i09], rubik.corn_[i21]);
650 std::swap(rubik.corn_[i14], rubik.corn_[i01]);
651 std::swap(rubik.corn_[i22], rubik.corn_[i14]);
652 std::swap(rubik.corn_[i11], rubik.corn_[i22]);
655 std::swap(rubik.corn_[i13], rubik.corn_[i02]);
656 std::swap(rubik.corn_[i23], rubik.corn_[i13]);
657 std::swap(rubik.corn_[i10], rubik.corn_[i23]);
667 int i03 = 3 - i * ( 3 * i - 17) / 2;
668 int i06 = 6 - i * (21 * i - 53) / 2;
670 int i15 = 15 + i * (12 * i - 20);
672 int i04 = 4 - i * ( 3 * i - 10);
673 int i07 = 7 - i * (12 * i - 28);
674 int i19 = 19 - i * ( 3 * i - 5) / 2;
675 int i16 = 16 + i * (21 * i - 37) / 2;
678 int i08 = 8 - i * ( 9 * i - 22);
679 int i20 = 20 + i * ( 3 * i - 7) / 2;
680 int i17 = 17 + i * (27 * i - 49) / 2;
686 std::swap(rubik.corn_[i06], rubik.corn_[i03]);
687 std::swap(rubik.corn_[i18], rubik.corn_[i06]);
688 std::swap(rubik.corn_[i15], rubik.corn_[i18]);
691 std::swap(rubik.corn_[i08], rubik.corn_[i04]);
692 std::swap(rubik.corn_[i19], rubik.corn_[i08]);
693 std::swap(rubik.corn_[i17], rubik.corn_[i19]);
696 std::swap(rubik.corn_[i07], rubik.corn_[i05]);
697 std::swap(rubik.corn_[i20], rubik.corn_[i07]);
698 std::swap(rubik.corn_[i16], rubik.corn_[i20]);
702 std::swap(rubik.corn_[i03], rubik.corn_[i18]);
703 std::swap(rubik.corn_[i15], rubik.corn_[i06]);
704 std::swap(rubik.corn_[i04], rubik.corn_[i19]);
705 std::swap(rubik.corn_[i17], rubik.corn_[i08]);
706 std::swap(rubik.corn_[i05], rubik.corn_[i20]);
707 std::swap(rubik.corn_[i16], rubik.corn_[i07]);
711 std::swap(rubik.corn_[i15], rubik.corn_[i03]);
712 std::swap(rubik.corn_[i18], rubik.corn_[i15]);
713 std::swap(rubik.corn_[i06], rubik.corn_[i18]);
716 std::swap(rubik.corn_[i17], rubik.corn_[i04]);
717 std::swap(rubik.corn_[i19], rubik.corn_[i17]);
718 std::swap(rubik.corn_[i08], rubik.corn_[i19]);
721 std::swap(rubik.corn_[i16], rubik.corn_[i05]);
722 std::swap(rubik.corn_[i20], rubik.corn_[i16]);
723 std::swap(rubik.corn_[i07], rubik.corn_[i20]);
1426 anim_move(
'x', 1, 3, mesh, color, sock);
1427 anim_move(
'z', 1, 3, mesh, color, sock);
1428 anim_move(
'x', 1, 1, mesh, color, sock);
1431 anim_move(
'y', 1, 1, mesh, color, sock);
1432 anim_move(
'z', 1, 3, mesh, color, sock);
1433 anim_move(
'y', 1, 3, mesh, color, sock);
1434 anim_move(
'x', 1, 3, mesh, color, sock);
1435 anim_move(
'z', 1, 2, mesh, color, sock);
1436 anim_move(
'x', 1, 1, mesh, color, sock);
1439 anim_move(
'y', 1, 1, mesh, color, sock);
1440 anim_move(
'z', 1, 1, mesh, color, sock);
1441 anim_move(
'y', 1, 3, mesh, color, sock);
1449 anim_move(
'x', 2, 1, mesh, color, sock);
1450 anim_move(
'y', 1, 2, mesh, color, sock);
1451 anim_move(
'x', 2, 3, mesh, color, sock);
1454 anim_move(
'z', 1, 1, mesh, color, sock);
1455 anim_move(
'x', 2, 1, mesh, color, sock);
1456 anim_move(
'y', 1, 3, mesh, color, sock);
1457 anim_move(
'x', 2, 3, mesh, color, sock);
1460 anim_move(
'x', 1, 3, mesh, color, sock);
1461 anim_move(
'z', 1, 1, mesh, color, sock);
1462 anim_move(
'x', 1, 1, mesh, color, sock);
1470 anim_move(
'y', 1, 1, mesh, color, sock);
1471 anim_move(
'z', 1, 2, mesh, color, sock);
1472 anim_move(
'y', 1, 3, mesh, color, sock);
1475 anim_move(
'x', 3, 1, mesh, color, sock);
1476 anim_move(
'z', 1, 1, mesh, color, sock);
1477 anim_move(
'x', 3, 3, mesh, color, sock);
1478 anim_move(
'x', 2, 1, mesh, color, sock);
1479 anim_move(
'y', 1, 3, mesh, color, sock);
1480 anim_move(
'x', 2, 3, mesh, color, sock);
1483 anim_move(
'x', 1, 3, mesh, color, sock);
1484 anim_move(
'z', 1, 2, mesh, color, sock);
1485 anim_move(
'x', 1, 1, mesh, color, sock);
1493 anim_move(
'y', 2, 3, mesh, color, sock);
1494 anim_move(
'x', 1, 2, mesh, color, sock);
1495 anim_move(
'y', 2, 1, mesh, color, sock);
1498 anim_move(
'y', 1, 1, mesh, color, sock);
1499 anim_move(
'z', 1, 3, mesh, color, sock);
1500 anim_move(
'y', 1, 3, mesh, color, sock);
1503 anim_move(
'z', 1, 3, mesh, color, sock);
1504 anim_move(
'y', 1, 1, mesh, color, sock);
1505 anim_move(
'z', 1, 1, mesh, color, sock);
1506 anim_move(
'y', 1, 3, mesh, color, sock);
1514 anim_move(
'y', 1, 1, mesh, color, sock);
1515 anim_move(
'z', 1, 1, mesh, color, sock);
1516 anim_move(
'y', 1, 3, mesh, color, sock);
1517 anim_move(
'z', 1, 3, mesh, color, sock);
1518 anim_move(
'y', 1, 1, mesh, color, sock);
1519 anim_move(
'z', 1, 1, mesh, color, sock);
1520 anim_move(
'y', 1, 3, mesh, color, sock);
1523 anim_move(
'x', 1, 3, mesh, color, sock);
1524 anim_move(
'z', 1, 3, mesh, color, sock);
1525 anim_move(
'x', 1, 1, mesh, color, sock);
1526 anim_move(
'z', 1, 1, mesh, color, sock);
1527 anim_move(
'x', 1, 3, mesh, color, sock);
1528 anim_move(
'z', 1, 3, mesh, color, sock);
1529 anim_move(
'x', 1, 1, mesh, color, sock);
1537 anim_move(
'x', 2, 1, mesh, color, sock);
1538 anim_move(
'y', 1, 1, mesh, color, sock);
1539 anim_move(
'x', 2, 3, mesh, color, sock);
1542 anim_move(
'x', 3, 3, mesh, color, sock);
1543 anim_move(
'z', 1, 1, mesh, color, sock);
1544 anim_move(
'x', 3, 1, mesh, color, sock);
1545 anim_move(
'x', 1, 3, mesh, color, sock);
1546 anim_move(
'z', 1, 3, mesh, color, sock);
1547 anim_move(
'x', 1, 1, mesh, color, sock);
1550 anim_move(
'y', 1, 3, mesh, color, sock);
1551 anim_move(
'z', 1, 3, mesh, color, sock);
1552 anim_move(
'y', 1, 2, mesh, color, sock);
1553 anim_move(
'z', 1, 2, mesh, color, sock);
1554 anim_move(
'y', 1, 3, mesh, color, sock);
1562 anim_move(
'y', 1, 1, mesh, color, sock);
1563 anim_move(
'y', 3, 3, mesh, color, sock);
1564 anim_move(
'z', 1, 2, mesh, color, sock);
1565 anim_move(
'y', 3, 1, mesh, color, sock);
1566 anim_move(
'y', 1, 3, mesh, color, sock);
1569 anim_move(
'x', 3, 1, mesh, color, sock);
1570 anim_move(
'z', 1, 1, mesh, color, sock);
1571 anim_move(
'x', 3, 3, mesh, color, sock);
1572 anim_move(
'x', 1, 3, mesh, color, sock);
1573 anim_move(
'z', 1, 2, mesh, color, sock);
1574 anim_move(
'x', 1, 1, mesh, color, sock);
1577 anim_move(
'y', 3, 3, mesh, color, sock);
1578 anim_move(
'z', 1, 3, mesh, color, sock);
1579 anim_move(
'y', 3, 1, mesh, color, sock);
1580 anim_move(
'y', 1, 1, mesh, color, sock);
1581 anim_move(
'z', 1, 2, mesh, color, sock);
1582 anim_move(
'y', 1, 3, mesh, color, sock);
1590 anim_move(
'x', 1, 1, mesh, color, sock);
1591 anim_move(
'z', 1, 1, mesh, color, sock);
1592 anim_move(
'x', 1, 2, mesh, color, sock);
1593 anim_move(
'z', 1, 2, mesh, color, sock);
1594 anim_move(
'x', 1, 1, mesh, color, sock);
1597 anim_move(
'y', 3, 1, mesh, color, sock);
1598 anim_move(
'z', 1, 3, mesh, color, sock);
1599 anim_move(
'y', 3, 3, mesh, color, sock);
1600 anim_move(
'y', 1, 1, mesh, color, sock);
1601 anim_move(
'z', 1, 1, mesh, color, sock);
1602 anim_move(
'y', 1, 3, mesh, color, sock);
1605 anim_move(
'y', 2, 3, mesh, color, sock);
1606 anim_move(
'x', 1, 3, mesh, color, sock);
1607 anim_move(
'y', 2, 1, mesh, color, sock);
1624 anim_move(
'z', 1, 2, mesh, color, sock);
1625 anim_move(
'y', 2, 1, mesh, color, sock);
1626 anim_move(
'x', 3, 2, mesh, color, sock);
1627 anim_move(
'y', 2, 3, mesh, color, sock);
1630 anim_move(
'z', 1, 3, mesh, color, sock);
1631 anim_move(
'x', 3, 3, mesh, color, sock);
1632 anim_move(
'z', 1, 1, mesh, color, sock);
1633 anim_move(
'x', 3, 1, mesh, color, sock);
1636 anim_move(
'x', 3, 3, mesh, color, sock);
1637 anim_move(
'z', 1, 3, mesh, color, sock);
1638 anim_move(
'x', 3, 1, mesh, color, sock);
1646 anim_move(
'x', 3, 3, mesh, color, sock);
1647 anim_move(
'z', 1, 1, mesh, color, sock);
1648 anim_move(
'x', 3, 1, mesh, color, sock);
1651 anim_move(
'y', 1, 3, mesh, color, sock);
1652 anim_move(
'z', 1, 1, mesh, color, sock);
1653 anim_move(
'y', 1, 1, mesh, color, sock);
1654 anim_move(
'x', 3, 3, mesh, color, sock);
1655 anim_move(
'z', 1, 2, mesh, color, sock);
1656 anim_move(
'x', 3, 1, mesh, color, sock);
1659 anim_move(
'y', 1, 3, mesh, color, sock);
1660 anim_move(
'z', 1, 3, mesh, color, sock);
1661 anim_move(
'y', 1, 1, mesh, color, sock);
1669 anim_move(
'y', 2, 1, mesh, color, sock);
1670 anim_move(
'x', 3, 2, mesh, color, sock);
1671 anim_move(
'y', 2, 3, mesh, color, sock);
1674 anim_move(
'y', 1, 3, mesh, color, sock);
1675 anim_move(
'z', 1, 1, mesh, color, sock);
1676 anim_move(
'y', 1, 1, mesh, color, sock);
1679 anim_move(
'z', 1, 1, mesh, color, sock);
1680 anim_move(
'y', 2, 1, mesh, color, sock);
1681 anim_move(
'x', 3, 1, mesh, color, sock);
1682 anim_move(
'y', 2, 3, mesh, color, sock);
1690 anim_move(
'y', 1, 3, mesh, color, sock);
1691 anim_move(
'z', 1, 2, mesh, color, sock);
1692 anim_move(
'y', 1, 1, mesh, color, sock);
1695 anim_move(
'z', 1, 1, mesh, color, sock);
1696 anim_move(
'y', 2, 1, mesh, color, sock);
1697 anim_move(
'x', 3, 2, mesh, color, sock);
1698 anim_move(
'y', 2, 3, mesh, color, sock);
1701 anim_move(
'x', 3, 3, mesh, color, sock);
1702 anim_move(
'z', 1, 2, mesh, color, sock);
1703 anim_move(
'x', 3, 1, mesh, color, sock);
1711 anim_move(
'y', 1, 3, mesh, color, sock);
1712 anim_move(
'z', 1, 3, mesh, color, sock);
1713 anim_move(
'y', 1, 1, mesh, color, sock);
1714 anim_move(
'z', 1, 1, mesh, color, sock);
1715 anim_move(
'y', 1, 3, mesh, color, sock);
1716 anim_move(
'z', 1, 3, mesh, color, sock);
1717 anim_move(
'y', 1, 1, mesh, color, sock);
1720 anim_move(
'x', 3, 3, mesh, color, sock);
1721 anim_move(
'z', 1, 1, mesh, color, sock);
1722 anim_move(
'x', 3, 1, mesh, color, sock);
1723 anim_move(
'z', 1, 3, mesh, color, sock);
1724 anim_move(
'x', 3, 3, mesh, color, sock);
1725 anim_move(
'z', 1, 1, mesh, color, sock);
1726 anim_move(
'x', 3, 1, mesh, color, sock);
1734 anim_move(
'x', 3, 1, mesh, color, sock);
1735 anim_move(
'z', 1, 3, mesh, color, sock);
1736 anim_move(
'x', 3, 2, mesh, color, sock);
1737 anim_move(
'z', 1, 2, mesh, color, sock);
1738 anim_move(
'x', 3, 1, mesh, color, sock);
1741 anim_move(
'y', 3, 3, mesh, color, sock);
1742 anim_move(
'z', 1, 1, mesh, color, sock);
1743 anim_move(
'y', 3, 1, mesh, color, sock);
1744 anim_move(
'y', 1, 3, mesh, color, sock);
1745 anim_move(
'z', 1, 3, mesh, color, sock);
1746 anim_move(
'y', 1, 1, mesh, color, sock);
1749 anim_move(
'y', 2, 1, mesh, color, sock);
1750 anim_move(
'x', 3, 3, mesh, color, sock);
1751 anim_move(
'y', 2, 3, mesh, color, sock);
1759 anim_move(
'y', 1, 3, mesh, color, sock);
1760 anim_move(
'y', 3, 1, mesh, color, sock);
1761 anim_move(
'z', 1, 2, mesh, color, sock);
1762 anim_move(
'y', 3, 3, mesh, color, sock);
1763 anim_move(
'y', 1, 1, mesh, color, sock);
1766 anim_move(
'x', 1, 1, mesh, color, sock);
1767 anim_move(
'z', 1, 3, mesh, color, sock);
1768 anim_move(
'x', 1, 3, mesh, color, sock);
1769 anim_move(
'x', 3, 3, mesh, color, sock);
1770 anim_move(
'z', 1, 2, mesh, color, sock);
1771 anim_move(
'x', 3, 1, mesh, color, sock);
1774 anim_move(
'y', 3, 1, mesh, color, sock);
1775 anim_move(
'z', 1, 1, mesh, color, sock);
1776 anim_move(
'y', 3, 3, mesh, color, sock);
1777 anim_move(
'y', 1, 3, mesh, color, sock);
1778 anim_move(
'z', 1, 2, mesh, color, sock);
1779 anim_move(
'y', 1, 1, mesh, color, sock);
1796 anim_move(
'y', 3, 3, mesh, color, sock);
1797 anim_move(
'z', 1, 2, mesh, color, sock);
1798 anim_move(
'y', 3, 1, mesh, color, sock);
1801 anim_move(
'z', 1, 1, mesh, color, sock);
1802 anim_move(
'x', 2, 3, mesh, color, sock);
1803 anim_move(
'y', 3, 2, mesh, color, sock);
1804 anim_move(
'x', 2, 1, mesh, color, sock);
1807 anim_move(
'x', 3, 1, mesh, color, sock);
1808 anim_move(
'z', 1, 2, mesh, color, sock);
1809 anim_move(
'x', 3, 3, mesh, color, sock);
1817 anim_move(
'z', 1, 2, mesh, color, sock);
1818 anim_move(
'x', 2, 3, mesh, color, sock);
1819 anim_move(
'y', 3, 2, mesh, color, sock);
1820 anim_move(
'x', 2, 1, mesh, color, sock);
1823 anim_move(
'y', 3, 3, mesh, color, sock);
1824 anim_move(
'z', 1, 3, mesh, color, sock);
1825 anim_move(
'y', 3, 1, mesh, color, sock);
1828 anim_move(
'z', 1, 1, mesh, color, sock);
1829 anim_move(
'x', 3, 1, mesh, color, sock);
1830 anim_move(
'z', 1, 2, mesh, color, sock);
1831 anim_move(
'x', 3, 3, mesh, color, sock);
1839 anim_move(
'x', 3, 1, mesh, color, sock);
1840 anim_move(
'z', 1, 3, mesh, color, sock);
1841 anim_move(
'x', 3, 3, mesh, color, sock);
1844 anim_move(
'x', 3, 1, mesh, color, sock);
1845 anim_move(
'z', 1, 1, mesh, color, sock);
1846 anim_move(
'x', 3, 3, mesh, color, sock);
1847 anim_move(
'y', 3, 3, mesh, color, sock);
1848 anim_move(
'z', 1, 2, mesh, color, sock);
1849 anim_move(
'y', 3, 1, mesh, color, sock);
1852 anim_move(
'y', 3, 3, mesh, color, sock);
1853 anim_move(
'z', 1, 1, mesh, color, sock);
1854 anim_move(
'y', 3, 1, mesh, color, sock);
1862 anim_move(
'x', 2, 3, mesh, color, sock);
1863 anim_move(
'y', 3, 2, mesh, color, sock);
1864 anim_move(
'x', 2, 1, mesh, color, sock);
1867 anim_move(
'z', 1, 1, mesh, color, sock);
1868 anim_move(
'x', 2, 3, mesh, color, sock);
1869 anim_move(
'y', 3, 1, mesh, color, sock);
1870 anim_move(
'x', 2, 1, mesh, color, sock);
1873 anim_move(
'x', 3, 1, mesh, color, sock);
1874 anim_move(
'z', 1, 1, mesh, color, sock);
1875 anim_move(
'x', 3, 3, mesh, color, sock);
1883 anim_move(
'y', 3, 3, mesh, color, sock);
1884 anim_move(
'z', 1, 1, mesh, color, sock);
1885 anim_move(
'y', 3, 1, mesh, color, sock);
1886 anim_move(
'z', 1, 3, mesh, color, sock);
1887 anim_move(
'y', 3, 3, mesh, color, sock);
1888 anim_move(
'z', 1, 1, mesh, color, sock);
1889 anim_move(
'y', 3, 1, mesh, color, sock);
1892 anim_move(
'x', 3, 1, mesh, color, sock);
1893 anim_move(
'z', 1, 3, mesh, color, sock);
1894 anim_move(
'x', 3, 3, mesh, color, sock);
1895 anim_move(
'z', 1, 1, mesh, color, sock);
1896 anim_move(
'x', 3, 1, mesh, color, sock);
1897 anim_move(
'z', 1, 3, mesh, color, sock);
1898 anim_move(
'x', 3, 3, mesh, color, sock);
1906 anim_move(
'x', 2, 3, mesh, color, sock);
1907 anim_move(
'y', 3, 3, mesh, color, sock);
1908 anim_move(
'x', 2, 1, mesh, color, sock);
1911 anim_move(
'x', 1, 1, mesh, color, sock);
1912 anim_move(
'z', 1, 1, mesh, color, sock);
1913 anim_move(
'x', 1, 3, mesh, color, sock);
1914 anim_move(
'x', 3, 1, mesh, color, sock);
1915 anim_move(
'z', 1, 3, mesh, color, sock);
1916 anim_move(
'x', 3, 3, mesh, color, sock);
1919 anim_move(
'y', 3, 1, mesh, color, sock);
1920 anim_move(
'z', 1, 3, mesh, color, sock);
1921 anim_move(
'y', 3, 2, mesh, color, sock);
1922 anim_move(
'z', 1, 2, mesh, color, sock);
1923 anim_move(
'y', 3, 1, mesh, color, sock);
1940 anim_move(
'z', 1, 1, mesh, color, sock);
1941 anim_move(
'y', 3, 1, mesh, color, sock);
1942 anim_move(
'z', 1, 1, mesh, color, sock);
1943 anim_move(
'y', 3, 3, mesh, color, sock);
1944 anim_move(
'x', 1, 1, mesh, color, sock);
1945 anim_move(
'z', 1, 2, mesh, color, sock);
1946 anim_move(
'x', 1, 3, mesh, color, sock);
1949 anim_move(
'y', 3, 1, mesh, color, sock);
1950 anim_move(
'z', 1, 1, mesh, color, sock);
1951 anim_move(
'y', 3, 3, mesh, color, sock);
1954 anim_move(
'z', 1, 3, mesh, color, sock);
1955 anim_move(
'x', 1, 1, mesh, color, sock);
1956 anim_move(
'z', 1, 2, mesh, color, sock);
1957 anim_move(
'x', 1, 3, mesh, color, sock);
1965 anim_move(
'y', 3, 1, mesh, color, sock);
1966 anim_move(
'z', 1, 2, mesh, color, sock);
1967 anim_move(
'y', 3, 3, mesh, color, sock);
1970 anim_move(
'z', 1, 2, mesh, color, sock);
1971 anim_move(
'x', 1, 1, mesh, color, sock);
1972 anim_move(
'z', 1, 3, mesh, color, sock);
1973 anim_move(
'x', 1, 3, mesh, color, sock);
1974 anim_move(
'y', 3, 1, mesh, color, sock);
1975 anim_move(
'z', 1, 2, mesh, color, sock);
1976 anim_move(
'y', 3, 3, mesh, color, sock);
1979 anim_move(
'x', 1, 1, mesh, color, sock);
1980 anim_move(
'z', 1, 2, mesh, color, sock);
1981 anim_move(
'x', 1, 3, mesh, color, sock);
1989 anim_move(
'z', 1, 3, mesh, color, sock);
1990 anim_move(
'x', 1, 1, mesh, color, sock);
1991 anim_move(
'z', 1, 3, mesh, color, sock);
1992 anim_move(
'x', 1, 3, mesh, color, sock);
1993 anim_move(
'y', 3, 1, mesh, color, sock);
1994 anim_move(
'z', 1, 2, mesh, color, sock);
1995 anim_move(
'y', 3, 3, mesh, color, sock);
1998 anim_move(
'z', 1, 1, mesh, color, sock);
1999 anim_move(
'y', 3, 1, mesh, color, sock);
2000 anim_move(
'z', 1, 2, mesh, color, sock);
2001 anim_move(
'y', 3, 3, mesh, color, sock);
2004 anim_move(
'x', 1, 1, mesh, color, sock);
2005 anim_move(
'z', 1, 3, mesh, color, sock);
2006 anim_move(
'x', 1, 3, mesh, color, sock);
2014 anim_move(
'x', 1, 1, mesh, color, sock);
2015 anim_move(
'z', 1, 1, mesh, color, sock);
2016 anim_move(
'x', 1, 3, mesh, color, sock);
2019 anim_move(
'y', 3, 1, mesh, color, sock);
2020 anim_move(
'z', 1, 1, mesh, color, sock);
2021 anim_move(
'y', 3, 3, mesh, color, sock);
2022 anim_move(
'x', 1, 1, mesh, color, sock);
2023 anim_move(
'z', 1, 2, mesh, color, sock);
2024 anim_move(
'x', 1, 3, mesh, color, sock);
2027 anim_move(
'y', 3, 1, mesh, color, sock);
2028 anim_move(
'z', 1, 3, mesh, color, sock);
2029 anim_move(
'y', 3, 3, mesh, color, sock);
2037 anim_move(
'y', 3, 1, mesh, color, sock);
2038 anim_move(
'z', 1, 3, mesh, color, sock);
2039 anim_move(
'y', 3, 3, mesh, color, sock);
2040 anim_move(
'z', 1, 1, mesh, color, sock);
2041 anim_move(
'y', 3, 1, mesh, color, sock);
2042 anim_move(
'z', 1, 3, mesh, color, sock);
2043 anim_move(
'y', 3, 3, mesh, color, sock);
2046 anim_move(
'x', 1, 1, mesh, color, sock);
2047 anim_move(
'z', 1, 1, mesh, color, sock);
2048 anim_move(
'x', 1, 3, mesh, color, sock);
2049 anim_move(
'z', 1, 3, mesh, color, sock);
2050 anim_move(
'x', 1, 1, mesh, color, sock);
2051 anim_move(
'z', 1, 1, mesh, color, sock);
2052 anim_move(
'x', 1, 3, mesh, color, sock);
2156 anim_move(
'y', 2, 1, mesh, color, sock);
2157 anim_move(
'x', 2, 1, mesh, color, sock);
2158 anim_move(
'y', 2, 3, mesh, color, sock);
2161 anim_move(
'x', 3, 1, mesh, color, sock);
2162 anim_move(
'y', 1, 1, mesh, color, sock);
2165 anim_move(
'y', 3, 2, mesh, color, sock);
2166 anim_move(
'z', 3, 2, mesh, color, sock);
2169 anim_move(
'x', 1, 2, mesh, color, sock);
2170 anim_move(
'z', 3, 3, mesh, color, sock);
2173 anim_move(
'z', 3, 1, mesh, color, sock);
2176 anim_move(
'y', 2, 1, mesh, color, sock);
2177 anim_move(
'x', 2, 3, mesh, color, sock);
2178 anim_move(
'y', 2, 3, mesh, color, sock);
2181 anim_move(
'y', 2, 3, mesh, color, sock);
2182 anim_move(
'z', 3, 1, mesh, color, sock);
2183 anim_move(
'y', 2, 1, mesh, color, sock);
2186 anim_move(
'y', 1, 3, mesh, color, sock);
2189 anim_move(
'z', 2, 1, mesh, color, sock);
2190 anim_move(
'y', 1, 3, mesh, color, sock);
2193 anim_move(
'y', 3, 1, mesh, color, sock);
2194 anim_move(
'z', 3, 2, mesh, color, sock);
2197 anim_move(
'x', 1, 3, mesh, color, sock);
2198 anim_move(
'z', 3, 3, mesh, color, sock);
2207 anim_move(
'y', 1, 2, mesh, color, sock);
2210 anim_move(
'z', 1, 3, mesh, color, sock);
2211 anim_move(
'y', 1, 2, mesh, color, sock);
2214 anim_move(
'x', 2, 3, mesh, color, sock);
2215 anim_move(
'z', 3, 1, mesh, color, sock);
2216 anim_move(
'x', 2, 1, mesh, color, sock);
2217 anim_move(
'z', 3, 1, mesh, color, sock);
2220 anim_move(
'y', 2, 3, mesh, color, sock);
2221 anim_move(
'z', 3, 3, mesh, color, sock);
2222 anim_move(
'y', 2, 1, mesh, color, sock);
2225 anim_move(
'y', 1, 3, mesh, color, sock);
2226 anim_move(
'z', 2, 1, mesh, color, sock);
2227 anim_move(
'y', 1, 3, mesh, color, sock);
2230 anim_move(
'y', 2, 1, mesh, color, sock);
2231 anim_move(
'z', 3, 3, mesh, color, sock);
2232 anim_move(
'y', 2, 3, mesh, color, sock);
2235 anim_move(
'z', 3, 2, mesh, color, sock);
2238 anim_move(
'z', 3, 3, mesh, color, sock);
2241 anim_move(
'z', 2, 3, mesh, color, sock);
2242 anim_move(
'y', 1, 1, mesh, color, sock);
2245 anim_move(
'y', 1, 1, mesh, color, sock);
2248 anim_move(
'x', 3, 3, mesh, color, sock);
2249 anim_move(
'z', 3, 1, mesh, color, sock);
2252 anim_move(
'y', 3, 3, mesh, color, sock);
2253 anim_move(
'z', 3, 2, mesh, color, sock);
2268 anim_move(
'y', 1, 3, mesh, color, sock);
2269 anim_move(
'x', 3, 1, mesh, color, sock);
2270 anim_move(
'y', 1, 1, mesh, color, sock);
2273 anim_move(
'x', 2, 3, mesh, color, sock);
2274 anim_move(
'y', 2, 1, mesh, color, sock);
2275 anim_move(
'x', 2, 1, mesh, color, sock);
2278 anim_move(
'z', 1, 1, mesh, color, sock);
2279 anim_move(
'x', 3, 2, mesh, color, sock);
2282 anim_move(
'z', 1, 2, mesh, color, sock);
2283 anim_move(
'x', 3, 2, mesh, color, sock);
2286 anim_move(
'y', 3, 3, mesh, color, sock);
2287 anim_move(
'x', 3, 3, mesh, color, sock);
2290 anim_move(
'x', 2, 1, mesh, color, sock);
2291 anim_move(
'y', 2, 3, mesh, color, sock);
2292 anim_move(
'x', 2, 3, mesh, color, sock);
2295 anim_move(
'z', 2, 3, mesh, color, sock);
2296 anim_move(
'x', 3, 1, mesh, color, sock);
2299 anim_move(
'x', 3, 1, mesh, color, sock);
2302 anim_move(
'z', 2, 1, mesh, color, sock);
2303 anim_move(
'x', 3, 1, mesh, color, sock);
2306 anim_move(
'y', 3, 2, mesh, color, sock);
2307 anim_move(
'x', 3, 3, mesh, color, sock);
2316 anim_move(
'z', 1, 3, mesh, color, sock);
2317 anim_move(
'x', 3, 2, mesh, color, sock);
2320 anim_move(
'x', 3, 2, mesh, color, sock);
2323 anim_move(
'y', 3, 1, mesh, color, sock);
2324 anim_move(
'x', 3, 3, mesh, color, sock);
2327 anim_move(
'z', 1, 2, mesh, color, sock);
2328 anim_move(
'x', 2, 3, mesh, color, sock);
2329 anim_move(
'y', 2, 1, mesh, color, sock);
2330 anim_move(
'x', 2, 1, mesh, color, sock);
2333 anim_move(
'x', 3, 1, mesh, color, sock);
2334 anim_move(
'z', 2, 1, mesh, color, sock);
2335 anim_move(
'x', 3, 1, mesh, color, sock);
2338 anim_move(
'y', 1, 1, mesh, color, sock);
2339 anim_move(
'z', 3, 1, mesh, color, sock);
2340 anim_move(
'y', 1, 3, mesh, color, sock);
2343 anim_move(
'y', 1, 1, mesh, color, sock);
2344 anim_move(
'z', 3, 2, mesh, color, sock);
2345 anim_move(
'y', 1, 3, mesh, color, sock);
2348 anim_move(
'z', 2, 2, mesh, color, sock);
2349 anim_move(
'x', 3, 3, mesh, color, sock);
2352 anim_move(
'z', 2, 3, mesh, color, sock);
2353 anim_move(
'x', 3, 3, mesh, color, sock);
2356 anim_move(
'x', 3, 3, mesh, color, sock);
2359 anim_move(
'z', 2, 1, mesh, color, sock);
2360 anim_move(
'x', 3, 3, mesh, color, sock);
2375 anim_move(
'z', 1, 2, mesh, color, sock);
2376 anim_move(
'y', 3, 2, mesh, color, sock);
2379 anim_move(
'z', 1, 3, mesh, color, sock);
2380 anim_move(
'y', 3, 2, mesh, color, sock);
2383 anim_move(
'y', 3, 1, mesh, color, sock);
2384 anim_move(
'z', 2, 3, mesh, color, sock);
2385 anim_move(
'y', 3, 3, mesh, color, sock);
2388 anim_move(
'x', 1, 3, mesh, color, sock);
2389 anim_move(
'y', 3, 3, mesh, color, sock);
2392 anim_move(
'z', 3, 1, mesh, color, sock);
2393 anim_move(
'y', 3, 1, mesh, color, sock);
2394 anim_move(
'z', 3, 3, mesh, color, sock);
2395 anim_move(
'y', 3, 3, mesh, color, sock);
2398 anim_move(
'z', 2, 1, mesh, color, sock);
2399 anim_move(
'y', 3, 3, mesh, color, sock);
2402 anim_move(
'z', 2, 2, mesh, color, sock);
2403 anim_move(
'y', 3, 3, mesh, color, sock);
2406 anim_move(
'z', 2, 3, mesh, color, sock);
2407 anim_move(
'y', 3, 3, mesh, color, sock);
2410 anim_move(
'y', 3, 3, mesh, color, sock);
2419 anim_move(
'z', 1, 1, mesh, color, sock);
2420 anim_move(
'x', 1, 3, mesh, color, sock);
2421 anim_move(
'y', 3, 3, mesh, color, sock);
2424 anim_move(
'x', 2, 1, mesh, color, sock);
2425 anim_move(
'z', 1, 3, mesh, color, sock);
2426 anim_move(
'x', 2, 3, mesh, color, sock);
2429 anim_move(
'y', 3, 2, mesh, color, sock);
2432 anim_move(
'z', 1, 1, mesh, color, sock);
2433 anim_move(
'y', 3, 2, mesh, color, sock);
2436 anim_move(
'y', 3, 1, mesh, color, sock);
2437 anim_move(
'z', 2, 1, mesh, color, sock);
2438 anim_move(
'y', 3, 1, mesh, color, sock);
2441 anim_move(
'x', 1, 1, mesh, color, sock);
2442 anim_move(
'y', 3, 3, mesh, color, sock);
2445 anim_move(
'z', 2, 2, mesh, color, sock);
2446 anim_move(
'y', 3, 1, mesh, color, sock);
2449 anim_move(
'z', 2, 3, mesh, color, sock);
2450 anim_move(
'y', 3, 1, mesh, color, sock);
2453 anim_move(
'y', 3, 1, mesh, color, sock);
2456 anim_move(
'z', 2, 1, mesh, color, sock);
2457 anim_move(
'y', 3, 1, mesh, color, sock);
2472 anim_move(
'z', 1, 1, mesh, color, sock);
2473 anim_move(
'x', 1, 2, mesh, color, sock);
2476 anim_move(
'z', 1, 2, mesh, color, sock);
2477 anim_move(
'x', 1, 2, mesh, color, sock);
2480 anim_move(
'y', 3, 3, mesh, color, sock);
2481 anim_move(
'x', 1, 3, mesh, color, sock);
2482 anim_move(
'y', 3, 1, mesh, color, sock);
2485 anim_move(
'x', 1, 1, mesh, color, sock);
2486 anim_move(
'z', 2, 1, mesh, color, sock);
2487 anim_move(
'x', 1, 3, mesh, color, sock);
2490 anim_move(
'x', 1, 1, mesh, color, sock);
2493 anim_move(
'z', 2, 1, mesh, color, sock);
2494 anim_move(
'x', 1, 1, mesh, color, sock);
2497 anim_move(
'z', 2, 2, mesh, color, sock);
2498 anim_move(
'x', 1, 1, mesh, color, sock);
2501 anim_move(
'z', 2, 3, mesh, color, sock);
2502 anim_move(
'x', 1, 1, mesh, color, sock);
2511 anim_move(
'y', 1, 3, mesh, color, sock);
2512 anim_move(
'x', 1, 1, mesh, color, sock);
2513 anim_move(
'y', 1, 1, mesh, color, sock);
2516 anim_move(
'z', 1, 3, mesh, color, sock);
2517 anim_move(
'y', 3, 3, mesh, color, sock);
2518 anim_move(
'x', 1, 3, mesh, color, sock);
2519 anim_move(
'y', 3, 1, mesh, color, sock);
2522 anim_move(
'z', 1, 3, mesh, color, sock);
2523 anim_move(
'x', 1, 2, mesh, color, sock);
2526 anim_move(
'x', 1, 2, mesh, color, sock);
2529 anim_move(
'x', 1, 1, mesh, color, sock);
2530 anim_move(
'z', 2, 3, mesh, color, sock);
2531 anim_move(
'x', 1, 1, mesh, color, sock);
2534 anim_move(
'z', 2, 1, mesh, color, sock);
2535 anim_move(
'x', 1, 3, mesh, color, sock);
2538 anim_move(
'z', 2, 2, mesh, color, sock);
2539 anim_move(
'x', 1, 3, mesh, color, sock);
2542 anim_move(
'z', 2, 3, mesh, color, sock);
2543 anim_move(
'x', 1, 3, mesh, color, sock);
2546 anim_move(
'x', 1, 3, mesh, color, sock);
2561 anim_move(
'z', 1, 2, mesh, color, sock);
2562 anim_move(
'y', 1, 1, mesh, color, sock);
2563 anim_move(
'z', 1, 3, mesh, color, sock);
2564 anim_move(
'y', 1, 3, mesh, color, sock);
2565 anim_move(
'x', 1, 1, mesh, color, sock);
2566 anim_move(
'y', 1, 3, mesh, color, sock);
2567 anim_move(
'x', 1, 3, mesh, color, sock);
2568 anim_move(
'y', 1, 1, mesh, color, sock);
2571 anim_move(
'z', 1, 3, mesh, color, sock);
2572 anim_move(
'y', 1, 1, mesh, color, sock);
2573 anim_move(
'z', 1, 3, mesh, color, sock);
2574 anim_move(
'y', 1, 3, mesh, color, sock);
2575 anim_move(
'x', 1, 1, mesh, color, sock);
2576 anim_move(
'y', 1, 3, mesh, color, sock);
2577 anim_move(
'x', 1, 3, mesh, color, sock);
2578 anim_move(
'y', 1, 1, mesh, color, sock);
2581 anim_move(
'z', 1, 1, mesh, color, sock);
2582 anim_move(
'x', 1, 3, mesh, color, sock);
2583 anim_move(
'z', 1, 1, mesh, color, sock);
2584 anim_move(
'x', 1, 1, mesh, color, sock);
2585 anim_move(
'y', 1, 3, mesh, color, sock);
2586 anim_move(
'x', 1, 1, mesh, color, sock);
2587 anim_move(
'y', 1, 1, mesh, color, sock);
2588 anim_move(
'x', 1, 3, mesh, color, sock);
2591 anim_move(
'z', 1, 2, mesh, color, sock);
2592 anim_move(
'x', 1, 3, mesh, color, sock);
2593 anim_move(
'z', 1, 1, mesh, color, sock);
2594 anim_move(
'x', 1, 1, mesh, color, sock);
2595 anim_move(
'y', 1, 3, mesh, color, sock);
2596 anim_move(
'x', 1, 1, mesh, color, sock);
2597 anim_move(
'y', 1, 1, mesh, color, sock);
2598 anim_move(
'x', 1, 3, mesh, color, sock);
2601 anim_move(
'x', 3, 3, mesh, color, sock);
2603 anim_move(
'x', 3, 1, mesh, color, sock);
2604 anim_move(
'z', 1, 1, mesh, color, sock);
2605 anim_move(
'y', 1, 1, mesh, color, sock);
2607 anim_move(
'y', 1, 3, mesh, color, sock);
2610 anim_move(
'z', 2, 1, mesh, color, sock);
2611 anim_move(
'y', 1, 2, mesh, color, sock);
2612 anim_move(
'z', 2, 3, mesh, color, sock);
2613 anim_move(
'y', 1, 2, mesh, color, sock);
2616 anim_move(
'y', 3, 1, mesh, color, sock);
2618 anim_move(
'y', 3, 3, mesh, color, sock);
2619 anim_move(
'z', 1, 3, mesh, color, sock);
2620 anim_move(
'y', 1, 1, mesh, color, sock);
2622 anim_move(
'y', 1, 3, mesh, color, sock);
2631 anim_move(
'z', 1, 3, mesh, color, sock);
2632 anim_move(
'x', 1, 3, mesh, color, sock);
2633 anim_move(
'z', 1, 1, mesh, color, sock);
2634 anim_move(
'x', 1, 1, mesh, color, sock);
2635 anim_move(
'y', 1, 3, mesh, color, sock);
2636 anim_move(
'x', 1, 1, mesh, color, sock);
2637 anim_move(
'y', 1, 1, mesh, color, sock);
2638 anim_move(
'x', 1, 3, mesh, color, sock);
2641 anim_move(
'x', 1, 3, mesh, color, sock);
2642 anim_move(
'z', 1, 1, mesh, color, sock);
2643 anim_move(
'x', 1, 1, mesh, color, sock);
2644 anim_move(
'y', 1, 3, mesh, color, sock);
2645 anim_move(
'x', 1, 1, mesh, color, sock);
2646 anim_move(
'y', 1, 1, mesh, color, sock);
2647 anim_move(
'x', 1, 3, mesh, color, sock);
2650 anim_move(
'y', 1, 1, mesh, color, sock);
2651 anim_move(
'z', 1, 3, mesh, color, sock);
2652 anim_move(
'y', 1, 3, mesh, color, sock);
2653 anim_move(
'x', 1, 1, mesh, color, sock);
2654 anim_move(
'y', 1, 3, mesh, color, sock);
2655 anim_move(
'x', 1, 3, mesh, color, sock);
2656 anim_move(
'y', 1, 1, mesh, color, sock);
2659 anim_move(
'z', 1, 1, mesh, color, sock);
2660 anim_move(
'y', 1, 1, mesh, color, sock);
2661 anim_move(
'z', 1, 3, mesh, color, sock);
2662 anim_move(
'y', 1, 3, mesh, color, sock);
2663 anim_move(
'x', 1, 1, mesh, color, sock);
2664 anim_move(
'y', 1, 3, mesh, color, sock);
2665 anim_move(
'x', 1, 3, mesh, color, sock);
2666 anim_move(
'y', 1, 1, mesh, color, sock);
2669 anim_move(
'y', 1, 1, mesh, color, sock);
2670 anim_move(
'z', 1, 3, mesh, color, sock);
2671 anim_move(
'y', 1, 3, mesh, color, sock);
2672 anim_move(
'x', 1, 1, mesh, color, sock);
2673 anim_move(
'y', 1, 3, mesh, color, sock);
2674 anim_move(
'x', 1, 3, mesh, color, sock);
2675 anim_move(
'y', 1, 1, mesh, color, sock);
2676 anim_move(
'z', 1, 3, mesh, color, sock);
2677 anim_move(
'y', 1, 1, mesh, color, sock);
2678 anim_move(
'z', 1, 3, mesh, color, sock);
2679 anim_move(
'y', 1, 3, mesh, color, sock);
2680 anim_move(
'x', 1, 1, mesh, color, sock);
2681 anim_move(
'y', 1, 3, mesh, color, sock);
2682 anim_move(
'x', 1, 3, mesh, color, sock);
2683 anim_move(
'y', 1, 1, mesh, color, sock);
2686 anim_move(
'y', 1, 2, mesh, color, sock);
2687 anim_move(
'z', 1, 2, mesh, color, sock);
2688 anim_move(
'y', 1, 2, mesh, color, sock);
2689 anim_move(
'z', 1, 2, mesh, color, sock);
2690 anim_move(
'y', 1, 2, mesh, color, sock);
2693 anim_move(
'y', 3, 3, mesh, color, sock);
2695 anim_move(
'y', 3, 1, mesh, color, sock);
2696 anim_move(
'z', 1, 3, mesh, color, sock);
2697 anim_move(
'y', 1, 1, mesh, color, sock);
2699 anim_move(
'y', 1, 3, mesh, color, sock);
2702 anim_move(
'z', 2, 1, mesh, color, sock);
2703 anim_move(
'x', 1, 2, mesh, color, sock);
2704 anim_move(
'z', 2, 3, mesh, color, sock);
2705 anim_move(
'x', 1, 2, mesh, color, sock);
2720 anim_move(
'z', 1, 1, mesh, color, sock);
2721 anim_move(
'x', 3, 3, mesh, color, sock);
2722 anim_move(
'z', 1, 3, mesh, color, sock);
2723 anim_move(
'x', 3, 1, mesh, color, sock);
2724 anim_move(
'y', 1, 1, mesh, color, sock);
2725 anim_move(
'x', 3, 1, mesh, color, sock);
2726 anim_move(
'y', 1, 3, mesh, color, sock);
2727 anim_move(
'x', 3, 3, mesh, color, sock);
2730 anim_move(
'z', 1, 2, mesh, color, sock);
2731 anim_move(
'x', 3, 3, mesh, color, sock);
2732 anim_move(
'z', 1, 3, mesh, color, sock);
2733 anim_move(
'x', 3, 1, mesh, color, sock);
2734 anim_move(
'y', 1, 1, mesh, color, sock);
2735 anim_move(
'x', 3, 1, mesh, color, sock);
2736 anim_move(
'y', 1, 3, mesh, color, sock);
2737 anim_move(
'x', 3, 3, mesh, color, sock);
2740 anim_move(
'y', 1, 3, mesh, color, sock);
2741 anim_move(
'z', 1, 1, mesh, color, sock);
2742 anim_move(
'y', 1, 1, mesh, color, sock);
2743 anim_move(
'x', 3, 1, mesh, color, sock);
2744 anim_move(
'y', 1, 1, mesh, color, sock);
2745 anim_move(
'x', 3, 3, mesh, color, sock);
2746 anim_move(
'y', 1, 3, mesh, color, sock);
2749 anim_move(
'z', 1, 1, mesh, color, sock);
2750 anim_move(
'y', 1, 3, mesh, color, sock);
2751 anim_move(
'z', 1, 1, mesh, color, sock);
2752 anim_move(
'y', 1, 1, mesh, color, sock);
2753 anim_move(
'x', 3, 1, mesh, color, sock);
2754 anim_move(
'y', 1, 1, mesh, color, sock);
2755 anim_move(
'x', 3, 3, mesh, color, sock);
2756 anim_move(
'y', 1, 3, mesh, color, sock);
2759 anim_move(
'y', 3, 3, mesh, color, sock);
2761 anim_move(
'y', 3, 1, mesh, color, sock);
2762 anim_move(
'z', 1, 3, mesh, color, sock);
2763 anim_move(
'y', 1, 3, mesh, color, sock);
2765 anim_move(
'y', 1, 1, mesh, color, sock);
2768 anim_move(
'z', 2, 1, mesh, color, sock);
2769 anim_move(
'x', 3, 2, mesh, color, sock);
2770 anim_move(
'z', 2, 3, mesh, color, sock);
2771 anim_move(
'x', 3, 2, mesh, color, sock);
2780 anim_move(
'z', 1, 2, mesh, color, sock);
2781 anim_move(
'y', 1, 3, mesh, color, sock);
2782 anim_move(
'z', 1, 1, mesh, color, sock);
2783 anim_move(
'y', 1, 1, mesh, color, sock);
2784 anim_move(
'x', 3, 1, mesh, color, sock);
2785 anim_move(
'y', 1, 1, mesh, color, sock);
2786 anim_move(
'x', 3, 3, mesh, color, sock);
2787 anim_move(
'y', 1, 3, mesh, color, sock);
2790 anim_move(
'z', 1, 3, mesh, color, sock);
2791 anim_move(
'y', 1, 3, mesh, color, sock);
2792 anim_move(
'z', 1, 1, mesh, color, sock);
2793 anim_move(
'y', 1, 1, mesh, color, sock);
2794 anim_move(
'x', 3, 1, mesh, color, sock);
2795 anim_move(
'y', 1, 1, mesh, color, sock);
2796 anim_move(
'x', 3, 3, mesh, color, sock);
2797 anim_move(
'y', 1, 3, mesh, color, sock);
2800 anim_move(
'z', 1, 3, mesh, color, sock);
2801 anim_move(
'x', 3, 3, mesh, color, sock);
2802 anim_move(
'z', 1, 3, mesh, color, sock);
2803 anim_move(
'x', 3, 1, mesh, color, sock);
2804 anim_move(
'y', 1, 1, mesh, color, sock);
2805 anim_move(
'x', 3, 1, mesh, color, sock);
2806 anim_move(
'y', 1, 3, mesh, color, sock);
2807 anim_move(
'x', 3, 3, mesh, color, sock);
2810 anim_move(
'x', 3, 3, mesh, color, sock);
2811 anim_move(
'z', 1, 3, mesh, color, sock);
2812 anim_move(
'x', 3, 1, mesh, color, sock);
2813 anim_move(
'y', 1, 1, mesh, color, sock);
2814 anim_move(
'x', 3, 1, mesh, color, sock);
2815 anim_move(
'y', 1, 3, mesh, color, sock);
2816 anim_move(
'x', 3, 3, mesh, color, sock);
2819 anim_move(
'x', 3, 3, mesh, color, sock);
2820 anim_move(
'z', 1, 3, mesh, color, sock);
2821 anim_move(
'x', 3, 1, mesh, color, sock);
2822 anim_move(
'y', 1, 1, mesh, color, sock);
2823 anim_move(
'x', 3, 1, mesh, color, sock);
2824 anim_move(
'y', 1, 3, mesh, color, sock);
2825 anim_move(
'x', 3, 3, mesh, color, sock);
2826 anim_move(
'z', 1, 3, mesh, color, sock);
2827 anim_move(
'x', 3, 3, mesh, color, sock);
2828 anim_move(
'z', 1, 3, mesh, color, sock);
2829 anim_move(
'x', 3, 1, mesh, color, sock);
2830 anim_move(
'y', 1, 1, mesh, color, sock);
2831 anim_move(
'x', 3, 1, mesh, color, sock);
2832 anim_move(
'y', 1, 3, mesh, color, sock);
2833 anim_move(
'x', 3, 3, mesh, color, sock);
2836 anim_move(
'x', 3, 2, mesh, color, sock);
2837 anim_move(
'z', 1, 2, mesh, color, sock);
2838 anim_move(
'x', 3, 2, mesh, color, sock);
2839 anim_move(
'z', 1, 2, mesh, color, sock);
2840 anim_move(
'x', 3, 2, mesh, color, sock);
2843 anim_move(
'y', 3, 1, mesh, color, sock);
2845 anim_move(
'y', 3, 3, mesh, color, sock);
2846 anim_move(
'z', 1, 3, mesh, color, sock);
2847 anim_move(
'y', 1, 3, mesh, color, sock);
2849 anim_move(
'y', 1, 1, mesh, color, sock);
2864 anim_move(
'y', 3, 3, mesh, color, sock);
2865 anim_move(
'z', 1, 3, mesh, color, sock);
2866 anim_move(
'y', 3, 1, mesh, color, sock);
2867 anim_move(
'x', 3, 3, mesh, color, sock);
2868 anim_move(
'y', 3, 1, mesh, color, sock);
2869 anim_move(
'x', 3, 1, mesh, color, sock);
2870 anim_move(
'y', 3, 3, mesh, color, sock);
2873 anim_move(
'z', 1, 1, mesh, color, sock);
2874 anim_move(
'y', 3, 3, mesh, color, sock);
2875 anim_move(
'z', 1, 3, mesh, color, sock);
2876 anim_move(
'y', 3, 1, mesh, color, sock);
2877 anim_move(
'x', 3, 3, mesh, color, sock);
2878 anim_move(
'y', 3, 1, mesh, color, sock);
2879 anim_move(
'x', 3, 1, mesh, color, sock);
2880 anim_move(
'y', 3, 3, mesh, color, sock);
2883 anim_move(
'z', 1, 3, mesh, color, sock);
2884 anim_move(
'x', 3, 1, mesh, color, sock);
2885 anim_move(
'z', 1, 1, mesh, color, sock);
2886 anim_move(
'x', 3, 3, mesh, color, sock);
2887 anim_move(
'y', 3, 1, mesh, color, sock);
2888 anim_move(
'x', 3, 3, mesh, color, sock);
2889 anim_move(
'y', 3, 3, mesh, color, sock);
2890 anim_move(
'x', 3, 1, mesh, color, sock);
2893 anim_move(
'x', 3, 1, mesh, color, sock);
2894 anim_move(
'z', 1, 1, mesh, color, sock);
2895 anim_move(
'x', 3, 3, mesh, color, sock);
2896 anim_move(
'y', 3, 1, mesh, color, sock);
2897 anim_move(
'x', 3, 3, mesh, color, sock);
2898 anim_move(
'y', 3, 3, mesh, color, sock);
2899 anim_move(
'x', 3, 1, mesh, color, sock);
2902 anim_move(
'y', 3, 1, mesh, color, sock);
2904 anim_move(
'y', 3, 3, mesh, color, sock);
2905 anim_move(
'z', 1, 1, mesh, color, sock);
2906 anim_move(
'y', 3, 3, mesh, color, sock);
2908 anim_move(
'y', 3, 1, mesh, color, sock);
2917 anim_move(
'z', 1, 1, mesh, color, sock);
2918 anim_move(
'x', 3, 1, mesh, color, sock);
2919 anim_move(
'z', 1, 1, mesh, color, sock);
2920 anim_move(
'x', 3, 3, mesh, color, sock);
2921 anim_move(
'y', 3, 1, mesh, color, sock);
2922 anim_move(
'x', 3, 3, mesh, color, sock);
2923 anim_move(
'y', 3, 3, mesh, color, sock);
2924 anim_move(
'x', 3, 1, mesh, color, sock);
2927 anim_move(
'z', 1, 2, mesh, color, sock);
2928 anim_move(
'x', 3, 1, mesh, color, sock);
2929 anim_move(
'z', 1, 1, mesh, color, sock);
2930 anim_move(
'x', 3, 3, mesh, color, sock);
2931 anim_move(
'y', 3, 1, mesh, color, sock);
2932 anim_move(
'x', 3, 3, mesh, color, sock);
2933 anim_move(
'y', 3, 3, mesh, color, sock);
2934 anim_move(
'x', 3, 1, mesh, color, sock);
2937 anim_move(
'z', 1, 2, mesh, color, sock);
2938 anim_move(
'y', 3, 3, mesh, color, sock);
2939 anim_move(
'z', 1, 3, mesh, color, sock);
2940 anim_move(
'y', 3, 1, mesh, color, sock);
2941 anim_move(
'x', 3, 3, mesh, color, sock);
2942 anim_move(
'y', 3, 1, mesh, color, sock);
2943 anim_move(
'x', 3, 1, mesh, color, sock);
2944 anim_move(
'y', 3, 3, mesh, color, sock);
2947 anim_move(
'z', 1, 3, mesh, color, sock);
2948 anim_move(
'y', 3, 3, mesh, color, sock);
2949 anim_move(
'z', 1, 3, mesh, color, sock);
2950 anim_move(
'y', 3, 1, mesh, color, sock);
2951 anim_move(
'x', 3, 3, mesh, color, sock);
2952 anim_move(
'y', 3, 1, mesh, color, sock);
2953 anim_move(
'x', 3, 1, mesh, color, sock);
2954 anim_move(
'y', 3, 3, mesh, color, sock);
2957 anim_move(
'x', 3, 1, mesh, color, sock);
2958 anim_move(
'z', 1, 1, mesh, color, sock);
2959 anim_move(
'x', 3, 3, mesh, color, sock);
2960 anim_move(
'y', 3, 1, mesh, color, sock);
2961 anim_move(
'x', 3, 3, mesh, color, sock);
2962 anim_move(
'y', 3, 3, mesh, color, sock);
2963 anim_move(
'x', 3, 1, mesh, color, sock);
2964 anim_move(
'z', 1, 1, mesh, color, sock);
2965 anim_move(
'x', 3, 1, mesh, color, sock);
2966 anim_move(
'z', 1, 1, mesh, color, sock);
2967 anim_move(
'x', 3, 3, mesh, color, sock);
2968 anim_move(
'y', 3, 1, mesh, color, sock);
2969 anim_move(
'x', 3, 3, mesh, color, sock);
2970 anim_move(
'y', 3, 3, mesh, color, sock);
2971 anim_move(
'x', 3, 1, mesh, color, sock);
2974 anim_move(
'y', 3, 2, mesh, color, sock);
2975 anim_move(
'z', 1, 2, mesh, color, sock);
2976 anim_move(
'y', 3, 2, mesh, color, sock);
2977 anim_move(
'z', 1, 2, mesh, color, sock);
2978 anim_move(
'y', 3, 2, mesh, color, sock);
2993 anim_move(
'z', 1, 3, mesh, color, sock);
2994 anim_move(
'x', 1, 1, mesh, color, sock);
2995 anim_move(
'z', 1, 3, mesh, color, sock);
2996 anim_move(
'x', 1, 3, mesh, color, sock);
2997 anim_move(
'y', 3, 3, mesh, color, sock);
2998 anim_move(
'x', 1, 3, mesh, color, sock);
2999 anim_move(
'y', 3, 1, mesh, color, sock);
3000 anim_move(
'x', 1, 1, mesh, color, sock);
3003 anim_move(
'x', 1, 1, mesh, color, sock);
3004 anim_move(
'z', 1, 3, mesh, color, sock);
3005 anim_move(
'x', 1, 3, mesh, color, sock);
3006 anim_move(
'y', 3, 3, mesh, color, sock);
3007 anim_move(
'x', 1, 3, mesh, color, sock);
3008 anim_move(
'y', 3, 1, mesh, color, sock);
3009 anim_move(
'x', 1, 1, mesh, color, sock);
3012 anim_move(
'z', 1, 2, mesh, color, sock);
3013 anim_move(
'y', 3, 1, mesh, color, sock);
3014 anim_move(
'z', 1, 1, mesh, color, sock);
3015 anim_move(
'y', 3, 3, mesh, color, sock);
3016 anim_move(
'x', 1, 3, mesh, color, sock);
3017 anim_move(
'y', 3, 3, mesh, color, sock);
3018 anim_move(
'x', 1, 1, mesh, color, sock);
3019 anim_move(
'y', 3, 1, mesh, color, sock);
3022 anim_move(
'z', 1, 3, mesh, color, sock);
3023 anim_move(
'y', 3, 1, mesh, color, sock);
3024 anim_move(
'z', 1, 1, mesh, color, sock);
3025 anim_move(
'y', 3, 3, mesh, color, sock);
3026 anim_move(
'x', 1, 3, mesh, color, sock);
3027 anim_move(
'y', 3, 3, mesh, color, sock);
3028 anim_move(
'x', 1, 1, mesh, color, sock);
3029 anim_move(
'y', 3, 1, mesh, color, sock);
3038 anim_move(
'y', 3, 1, mesh, color, sock);
3039 anim_move(
'z', 1, 1, mesh, color, sock);
3040 anim_move(
'y', 3, 3, mesh, color, sock);
3041 anim_move(
'x', 1, 3, mesh, color, sock);
3042 anim_move(
'y', 3, 3, mesh, color, sock);
3043 anim_move(
'x', 1, 1, mesh, color, sock);
3044 anim_move(
'y', 3, 1, mesh, color, sock);
3047 anim_move(
'z', 1, 1, mesh, color, sock);
3048 anim_move(
'y', 3, 1, mesh, color, sock);
3049 anim_move(
'z', 1, 1, mesh, color, sock);
3050 anim_move(
'y', 3, 3, mesh, color, sock);
3051 anim_move(
'x', 1, 3, mesh, color, sock);
3052 anim_move(
'y', 3, 3, mesh, color, sock);
3053 anim_move(
'x', 1, 1, mesh, color, sock);
3054 anim_move(
'y', 3, 1, mesh, color, sock);
3057 anim_move(
'z', 1, 1, mesh, color, sock);
3058 anim_move(
'x', 1, 1, mesh, color, sock);
3059 anim_move(
'z', 1, 3, mesh, color, sock);
3060 anim_move(
'x', 1, 3, mesh, color, sock);
3061 anim_move(
'y', 3, 3, mesh, color, sock);
3062 anim_move(
'x', 1, 3, mesh, color, sock);
3063 anim_move(
'y', 3, 1, mesh, color, sock);
3064 anim_move(
'x', 1, 1, mesh, color, sock);
3067 anim_move(
'z', 1, 2, mesh, color, sock);
3068 anim_move(
'x', 1, 1, mesh, color, sock);
3069 anim_move(
'z', 1, 3, mesh, color, sock);
3070 anim_move(
'x', 1, 3, mesh, color, sock);
3071 anim_move(
'y', 3, 3, mesh, color, sock);
3072 anim_move(
'x', 1, 3, mesh, color, sock);
3073 anim_move(
'y', 3, 1, mesh, color, sock);
3074 anim_move(
'x', 1, 1, mesh, color, sock);
3077 anim_move(
'x', 1, 1, mesh, color, sock);
3078 anim_move(
'z', 1, 3, mesh, color, sock);
3079 anim_move(
'x', 1, 3, mesh, color, sock);
3080 anim_move(
'y', 3, 3, mesh, color, sock);
3081 anim_move(
'x', 1, 3, mesh, color, sock);
3082 anim_move(
'y', 3, 1, mesh, color, sock);
3083 anim_move(
'x', 1, 1, mesh, color, sock);
3084 anim_move(
'z', 1, 3, mesh, color, sock);
3085 anim_move(
'x', 1, 1, mesh, color, sock);
3086 anim_move(
'z', 1, 3, mesh, color, sock);
3087 anim_move(
'x', 1, 3, mesh, color, sock);
3088 anim_move(
'y', 3, 3, mesh, color, sock);
3089 anim_move(
'x', 1, 3, mesh, color, sock);
3090 anim_move(
'y', 3, 1, mesh, color, sock);
3091 anim_move(
'x', 1, 1, mesh, color, sock);
3293 cout <<
"Entering swap_corners" << endl;
3300 for (
int i=0; i<8; i++)
3302 if ((rubik.corn_[3 * i] == c0[0] &&
3303 rubik.corn_[3 * i + 1] == c0[1] &&
3304 rubik.corn_[3 * i + 2] == c0[2]) ||
3305 (rubik.corn_[3 * i] == c0[1] &&
3306 rubik.corn_[3 * i + 1] == c0[2] &&
3307 rubik.corn_[3 * i + 2] == c0[0]) ||
3308 (rubik.corn_[3 * i] == c0[2] &&
3309 rubik.corn_[3 * i + 1] == c0[0] &&
3310 rubik.corn_[3 * i + 2] == c0[1]) ||
3311 (rubik.corn_[3 * i] == c0[2] &&
3312 rubik.corn_[3 * i + 1] == c0[1] &&
3313 rubik.corn_[3 * i + 2] == c0[0]) ||
3314 (rubik.corn_[3 * i] == c0[1] &&
3315 rubik.corn_[3 * i + 1] == c0[0] &&
3316 rubik.corn_[3 * i + 2] == c0[2]) ||
3317 (rubik.corn_[3 * i] == c0[0] &&
3318 rubik.corn_[3 * i + 1] == c0[2] &&
3319 rubik.corn_[3 * i + 2] == c0[1]))
3327 cout <<
"Location of c0 = {"<<c0[0]<<
","<<c0[1]<<
","<<c0[2]<<
"}: "
3339 anim_move(
'z', 1, i0, mesh, color, sock);
3341 anim_move(
'z', 1, 4-i0, mesh, color, sock);
3344 anim_move(
'x', 1, 3, mesh, color, sock);
3346 anim_move(
'x', 1, 1, mesh, color, sock);
3349 anim_move(
'y', 1, 2, mesh, color, sock);
3351 anim_move(
'y', 1, 2, mesh, color, sock);
3354 anim_move(
'z', 3, 2, mesh, color, sock);
3355 anim_move(
'x', 1, 3, mesh, color, sock);
3357 anim_move(
'x', 1, 1, mesh, color, sock);
3358 anim_move(
'z', 3, 2, mesh, color, sock);
3361 anim_move(
'x', 1, 2, mesh, color, sock);
3363 anim_move(
'x', 1, 2, mesh, color, sock);
3367 else if (c1 != NULL)
3371 for (
int i=1; i<8; i++)
3373 if ((rubik.corn_[3 * i] == c1[0] &&
3374 rubik.corn_[3 * i + 1] == c1[1] &&
3375 rubik.corn_[3 * i + 2] == c1[2]) ||
3376 (rubik.corn_[3 * i] == c1[1] &&
3377 rubik.corn_[3 * i + 1] == c1[2] &&
3378 rubik.corn_[3 * i + 2] == c1[0]) ||
3379 (rubik.corn_[3 * i] == c1[2] &&
3380 rubik.corn_[3 * i + 1] == c1[0] &&
3381 rubik.corn_[3 * i + 2] == c1[1]) ||
3382 (rubik.corn_[3 * i] == c1[2] &&
3383 rubik.corn_[3 * i + 1] == c1[1] &&
3384 rubik.corn_[3 * i + 2] == c1[0]) ||
3385 (rubik.corn_[3 * i] == c1[1] &&
3386 rubik.corn_[3 * i + 1] == c1[0] &&
3387 rubik.corn_[3 * i + 2] == c1[2]) ||
3388 (rubik.corn_[3 * i] == c1[0] &&
3389 rubik.corn_[3 * i + 1] == c1[2] &&
3390 rubik.corn_[3 * i + 2] == c1[1]))
3398 cout <<
"Location of piece belonging at " << 0 <<
" (c1) is "
3408 anim_move(
'x', 3, 1, mesh, color, sock);
3410 anim_move(
'x', 3, 3, mesh, color, sock);
3413 anim_move(
'y', 3, 1, mesh, color, sock);
3414 anim_move(
'x', 3, 1, mesh, color, sock);
3416 anim_move(
'x', 3, 3, mesh, color, sock);
3417 anim_move(
'y', 3, 3, mesh, color, sock);
3420 anim_move(
'z', 3, 3, mesh, color, sock);
3421 anim_move(
'x', 3, 3, mesh, color, sock);
3423 anim_move(
'x', 3, 1, mesh, color, sock);
3424 anim_move(
'z', 3, 1, mesh, color, sock);
3427 anim_move(
'x', 3, 3, mesh, color, sock);
3429 anim_move(
'x', 3, 1, mesh, color, sock);
3432 anim_move(
'x', 3, 2, mesh, color, sock);
3434 anim_move(
'x', 3, 2, mesh, color, sock);
3437 anim_move(
'z', 3, 2, mesh, color, sock);
3438 anim_move(
'x', 3, 3, mesh, color, sock);
3440 anim_move(
'x', 3, 1, mesh, color, sock);
3441 anim_move(
'z', 3, 2, mesh, color, sock);
3447 anim_move(
'x', 3, 3, mesh, color, sock);
3448 anim_move(
'z', 1, 1, mesh, color, sock);
3449 anim_move(
'x', 3, 1, mesh, color, sock);
3450 anim_move(
'y', 1, 3, mesh, color, sock);
3451 anim_move(
'z', 1, 3, mesh, color, sock);
3452 anim_move(
'y', 1, 1, mesh, color, sock);
3453 anim_move(
'x', 3, 3, mesh, color, sock);
3454 anim_move(
'z', 1, 3, mesh, color, sock);
3455 anim_move(
'x', 3, 1, mesh, color, sock);
3456 anim_move(
'z', 1, 2, mesh, color, sock);
3636 bool cw,
int * c0,
int * c1,
int * c2)
3642 for (
int i=0; i<8; i++)
3644 if ((rubik.corn_[3 * i] == c0[0] &&
3645 rubik.corn_[3 * i + 1] == c0[1] &&
3646 rubik.corn_[3 * i + 2] == c0[2]) ||
3647 (rubik.corn_[3 * i] == c0[1] &&
3648 rubik.corn_[3 * i + 1] == c0[2] &&
3649 rubik.corn_[3 * i + 2] == c0[0]) ||
3650 (rubik.corn_[3 * i] == c0[2] &&
3651 rubik.corn_[3 * i + 1] == c0[0] &&
3652 rubik.corn_[3 * i + 2] == c0[1]) ||
3653 (rubik.corn_[3 * i] == c0[2] &&
3654 rubik.corn_[3 * i + 1] == c0[1] &&
3655 rubik.corn_[3 * i + 2] == c0[0]) ||
3656 (rubik.corn_[3 * i] == c0[1] &&
3657 rubik.corn_[3 * i + 1] == c0[0] &&
3658 rubik.corn_[3 * i + 2] == c0[2]) ||
3659 (rubik.corn_[3 * i] == c0[0] &&
3660 rubik.corn_[3 * i + 1] == c0[2] &&
3661 rubik.corn_[3 * i + 2] == c0[1]))
3669 cout <<
"Location of c0 = {"<<c0[0]<<
","<<c0[1]<<
","<<c0[2]<<
"}: "
3681 anim_move(
'z', 1, i0, mesh, color, sock);
3683 anim_move(
'z', 1, 4-i0, mesh, color, sock);
3686 anim_move(
'x', 1, 3, mesh, color, sock);
3688 anim_move(
'x', 1, 1, mesh, color, sock);
3691 anim_move(
'y', 1, 2, mesh, color, sock);
3693 anim_move(
'y', 1, 2, mesh, color, sock);
3696 anim_move(
'z', 3, 2, mesh, color, sock);
3697 anim_move(
'x', 1, 3, mesh, color, sock);
3699 anim_move(
'x', 1, 1, mesh, color, sock);
3700 anim_move(
'z', 3, 2, mesh, color, sock);
3703 anim_move(
'x', 1, 2, mesh, color, sock);
3705 anim_move(
'x', 1, 2, mesh, color, sock);
3710 else if (c1 != NULL)
3714 for (
int i=1; i<8; i++)
3716 if ((rubik.corn_[3 * i] == c1[0] &&
3717 rubik.corn_[3 * i + 1] == c1[1] &&
3718 rubik.corn_[3 * i + 2] == c1[2]) ||
3719 (rubik.corn_[3 * i] == c1[1] &&
3720 rubik.corn_[3 * i + 1] == c1[2] &&
3721 rubik.corn_[3 * i + 2] == c1[0]) ||
3722 (rubik.corn_[3 * i] == c1[2] &&
3723 rubik.corn_[3 * i + 1] == c1[0] &&
3724 rubik.corn_[3 * i + 2] == c1[1]) ||
3725 (rubik.corn_[3 * i] == c1[2] &&
3726 rubik.corn_[3 * i + 1] == c1[1] &&
3727 rubik.corn_[3 * i + 2] == c1[0]) ||
3728 (rubik.corn_[3 * i] == c1[1] &&
3729 rubik.corn_[3 * i + 1] == c1[0] &&
3730 rubik.corn_[3 * i + 2] == c1[2]) ||
3731 (rubik.corn_[3 * i] == c1[0] &&
3732 rubik.corn_[3 * i + 1] == c1[2] &&
3733 rubik.corn_[3 * i + 2] == c1[1]))
3741 cout <<
"Location of c1 = {"<<c1[0]<<
","<<c1[1]<<
","<<c1[2]<<
"}: "
3753 anim_move(
'x', 3, 1, mesh, color, sock);
3755 anim_move(
'x', 3, 3, mesh, color, sock);
3758 anim_move(
'y', 3, 1, mesh, color, sock);
3759 anim_move(
'x', 3, 1, mesh, color, sock);
3761 anim_move(
'x', 3, 3, mesh, color, sock);
3762 anim_move(
'y', 3, 3, mesh, color, sock);
3765 anim_move(
'z', 3, 3, mesh, color, sock);
3766 anim_move(
'x', 3, 3, mesh, color, sock);
3768 anim_move(
'x', 3, 1, mesh, color, sock);
3769 anim_move(
'z', 3, 1, mesh, color, sock);
3772 anim_move(
'x', 3, 3, mesh, color, sock);
3774 anim_move(
'x', 3, 1, mesh, color, sock);
3777 anim_move(
'x', 3, 2, mesh, color, sock);
3779 anim_move(
'x', 3, 2, mesh, color, sock);
3782 anim_move(
'z', 3, 2, mesh, color, sock);
3783 anim_move(
'x', 3, 3, mesh, color, sock);
3785 anim_move(
'x', 3, 1, mesh, color, sock);
3786 anim_move(
'z', 3, 2, mesh, color, sock);
3798 anim_move(
'y', 3, 3, mesh, color, sock);
3800 anim_move(
'y', 3, 1, mesh, color, sock);
3803 anim_move(
'x', 3, 3, mesh, color, sock);
3804 anim_move(
'y', 3, 3, mesh, color, sock);
3806 anim_move(
'y', 3, 1, mesh, color, sock);
3807 anim_move(
'x', 3, 1, mesh, color, sock);
3810 anim_move(
'z', 3, 1, mesh, color, sock);
3811 anim_move(
'y', 3, 1, mesh, color, sock);
3813 anim_move(
'y', 3, 3, mesh, color, sock);
3814 anim_move(
'z', 3, 3, mesh, color, sock);
3817 anim_move(
'z', 3, 2, mesh, color, sock);
3818 anim_move(
'y', 3, 1, mesh, color, sock);
3820 anim_move(
'y', 3, 3, mesh, color, sock);
3821 anim_move(
'z', 3, 2, mesh, color, sock);
3824 anim_move(
'y', 3, 2, mesh, color, sock);
3826 anim_move(
'y', 3, 2, mesh, color, sock);
3829 anim_move(
'y', 3, 1, mesh, color, sock);
3831 anim_move(
'y', 3, 3, mesh, color, sock);
3836 else if (c2 != NULL)
3840 for (
int i=2; i<8; i++)
3842 if ((rubik.corn_[3 * i] == c2[0] &&
3843 rubik.corn_[3 * i + 1] == c2[1] &&
3844 rubik.corn_[3 * i + 2] == c2[2]) ||
3845 (rubik.corn_[3 * i] == c2[1] &&
3846 rubik.corn_[3 * i + 1] == c2[2] &&
3847 rubik.corn_[3 * i + 2] == c2[0]) ||
3848 (rubik.corn_[3 * i] == c2[2] &&
3849 rubik.corn_[3 * i + 1] == c2[0] &&
3850 rubik.corn_[3 * i + 2] == c2[1]) ||
3851 (rubik.corn_[3 * i] == c2[2] &&
3852 rubik.corn_[3 * i + 1] == c2[1] &&
3853 rubik.corn_[3 * i + 2] == c2[0]) ||
3854 (rubik.corn_[3 * i] == c2[1] &&
3855 rubik.corn_[3 * i + 1] == c2[0] &&
3856 rubik.corn_[3 * i + 2] == c2[2]) ||
3857 (rubik.corn_[3 * i] == c2[0] &&
3858 rubik.corn_[3 * i + 1] == c2[2] &&
3859 rubik.corn_[3 * i + 2] == c2[1]))
3867 cout <<
"Location of c2 = {"<<c2[0]<<
","<<c2[1]<<
","<<c2[2]<<
"}: "
3877 anim_move(
'y', 3, 1, mesh, color, sock);
3879 anim_move(
'y', 3, 3, mesh, color, sock);
3882 anim_move(
'z', 3, 2, mesh, color, sock);
3883 anim_move(
'y', 3, 3, mesh, color, sock);
3885 anim_move(
'y', 3, 1, mesh, color, sock);
3886 anim_move(
'z', 3, 2, mesh, color, sock);
3889 anim_move(
'z', 3, 3, mesh, color, sock);
3890 anim_move(
'y', 3, 3, mesh, color, sock);
3892 anim_move(
'y', 3, 1, mesh, color, sock);
3893 anim_move(
'z', 3, 1, mesh, color, sock);
3896 anim_move(
'y', 3, 3, mesh, color, sock);
3898 anim_move(
'y', 3, 1, mesh, color, sock);
3901 anim_move(
'y', 3, 2, mesh, color, sock);
3903 anim_move(
'y', 3, 2, mesh, color, sock);
3913 cout <<
"twist_corners performing clockwise twist" << endl;
3915 anim_move(
'x', 3, 1, mesh, color, sock);
3916 anim_move(
'z', 1, 3, mesh, color, sock);
3917 anim_move(
'x', 3, 3, mesh, color, sock);
3918 anim_move(
'z', 1, 3, mesh, color, sock);
3919 anim_move(
'x', 3, 1, mesh, color, sock);
3920 anim_move(
'z', 1, 2, mesh, color, sock);
3921 anim_move(
'x', 3, 3, mesh, color, sock);
3922 anim_move(
'z', 1, 2, mesh, color, sock);
3928 cout <<
"twist_corners performing counter-clockwise twist" << endl;
3930 anim_move(
'y', 1, 1, mesh, color, sock);
3931 anim_move(
'z', 1, 1, mesh, color, sock);
3932 anim_move(
'y', 1, 3, mesh, color, sock);
3933 anim_move(
'z', 1, 1, mesh, color, sock);
3934 anim_move(
'y', 1, 1, mesh, color, sock);
3935 anim_move(
'z', 1, 2, mesh, color, sock);
3936 anim_move(
'y', 1, 3, mesh, color, sock);
3937 anim_move(
'z', 1, 2, mesh, color, sock);
4057 int * e0,
int * e1,
int * e2)
4061 cout <<
"Entering permute_edges" << endl;
4068 for (
int i=0; i<12; i++)
4070 if ((rubik.edge_[2 * i] == e0[0] &&
4071 rubik.edge_[2 * i + 1] == e0[1]) ||
4072 (rubik.edge_[2 * i] == e0[1] &&
4073 rubik.edge_[2 * i + 1] == e0[0]))
4081 cout <<
"Location of e0 = {"<<e0[0]<<
","<<e0[1]<<
"}: " << i0 << endl;
4092 anim_move(
'z', 1, i0, mesh, color, sock);
4094 anim_move(
'z', 1, 4-i0, mesh, color, sock);
4097 anim_move(
'x', 2, 3, mesh, color, sock);
4099 anim_move(
'x', 2, 1, mesh, color, sock);
4102 anim_move(
'y', 2, 3, mesh, color, sock);
4104 anim_move(
'y', 2, 1, mesh, color, sock);
4107 anim_move(
'x', 2, 2, mesh, color, sock);
4109 anim_move(
'x', 2, 2, mesh, color, sock);
4112 anim_move(
'y', 2, 1, mesh, color, sock);
4114 anim_move(
'y', 2, 3, mesh, color, sock);
4117 anim_move(
'y', 1, 1, mesh, color, sock);
4119 anim_move(
'y', 1, 3, mesh, color, sock);
4122 anim_move(
'y', 1, 3, mesh, color, sock);
4124 anim_move(
'y', 1, 1, mesh, color, sock);
4127 anim_move(
'x', 3, 1, mesh, color, sock);
4129 anim_move(
'x', 3, 3, mesh, color, sock);
4132 anim_move(
'x', 1, 1, mesh, color, sock);
4134 anim_move(
'x', 1, 3, mesh, color, sock);
4138 else if (e1 != NULL)
4142 for (
int i=1; i<12; i++)
4144 if ((rubik.edge_[2 * i] == e1[0] &&
4145 rubik.edge_[2 * i + 1] == e1[1]) ||
4146 (rubik.edge_[2 * i] == e1[1] &&
4147 rubik.edge_[2 * i + 1] == e1[0]))
4155 cout <<
"Location of piece belonging at " << 0 <<
" (e1) is "
4166 anim_move(
'y', 1, 1, mesh, color, sock);
4167 anim_move(
'z', 1, i1-1, mesh, color, sock);
4168 anim_move(
'y', 1, 3, mesh, color, sock);
4170 anim_move(
'y', 1, 1, mesh, color, sock);
4171 anim_move(
'z', 1, 5-i1, mesh, color, sock);
4172 anim_move(
'y', 1, 3, mesh, color, sock);
4178 anim_move(
'z', 3, (i1-1)%4, mesh, color, sock);
4179 anim_move(
'x', 3, 2, mesh, color, sock);
4181 anim_move(
'x', 3, 2, mesh, color, sock);
4182 anim_move(
'z', 3, (9-i1)%4, mesh, color, sock);
4188 anim_move(
'z', 2, (i1-5)%4, mesh, color, sock);
4189 anim_move(
'x', 3, 3, mesh, color, sock);
4191 anim_move(
'x', 3, 1, mesh, color, sock);
4192 anim_move(
'z', 2, (13-i1)%4, mesh, color, sock);
4196 else if (e2 != NULL)
4200 for (
int i=2; i<12; i++)
4202 if ((rubik.edge_[2 * i] == e2[0] &&
4203 rubik.edge_[2 * i + 1] == e2[1]) ||
4204 (rubik.edge_[2 * i] == e2[1] &&
4205 rubik.edge_[2 * i + 1] == e2[0]))
4213 cout <<
"Location of e2: " << i2 << endl;
4222 anim_move(
'x', 1, 3, mesh, color, sock);
4223 anim_move(
'y', 3, 1, mesh, color, sock);
4225 anim_move(
'y', 3, 3, mesh, color, sock);
4226 anim_move(
'x', 1, 1, mesh, color, sock);
4232 anim_move(
'z', 3, (i2-2)%4, mesh, color, sock);
4233 anim_move(
'y', 3, 2, mesh, color, sock);
4235 anim_move(
'y', 3, 2, mesh, color, sock);
4236 anim_move(
'z', 3, (10-i2)%4, mesh, color, sock);
4242 anim_move(
'z', 2, (i2-6)%4, mesh, color, sock);
4243 anim_move(
'y', 3, 3, mesh, color, sock);
4245 anim_move(
'y', 3, 1, mesh, color, sock);
4246 anim_move(
'z', 2, (14-i2)%4, mesh, color, sock);
4357 int n,
int * e0,
int * e1,
int * e2,
int * e3)
4365 for (
int i=0; i<12; i++)
4367 if ((rubik.edge_[2 * i] == e0[0] &&
4368 rubik.edge_[2 * i + 1] == e0[1]) ||
4369 (rubik.edge_[2 * i] == e0[1] &&
4370 rubik.edge_[2 * i + 1] == e0[0]))
4378 cout <<
"Location of e0 = {"<<e0[0]<<
","<<e0[1]<<
"}: " << i0 << endl;
4389 anim_move(
'z', 1, i0, mesh, color, sock);
4391 anim_move(
'z', 1, 4-i0, mesh, color, sock);
4394 anim_move(
'x', 2, 3, mesh, color, sock);
4396 anim_move(
'x', 2, 1, mesh, color, sock);
4399 anim_move(
'y', 2, 3, mesh, color, sock);
4401 anim_move(
'y', 2, 1, mesh, color, sock);
4404 anim_move(
'x', 2, 2, mesh, color, sock);
4406 anim_move(
'x', 2, 2, mesh, color, sock);
4409 anim_move(
'y', 2, 1, mesh, color, sock);
4411 anim_move(
'y', 2, 3, mesh, color, sock);
4414 anim_move(
'y', 1, 1, mesh, color, sock);
4416 anim_move(
'y', 1, 3, mesh, color, sock);
4419 anim_move(
'y', 1, 3, mesh, color, sock);
4421 anim_move(
'y', 1, 1, mesh, color, sock);
4424 anim_move(
'x', 3, 1, mesh, color, sock);
4426 anim_move(
'x', 3, 3, mesh, color, sock);
4429 anim_move(
'x', 1, 1, mesh, color, sock);
4431 anim_move(
'x', 1, 3, mesh, color, sock);
4435 else if (e1 != NULL)
4439 for (
int i=1; i<12; i++)
4441 if ((rubik.edge_[2 * i] == e1[0] &&
4442 rubik.edge_[2 * i + 1] == e1[1]) ||
4443 (rubik.edge_[2 * i] == e1[1] &&
4444 rubik.edge_[2 * i + 1] == e1[0]))
4452 cout <<
"Location of e1: " << i1 << endl;
4458 anim_move(
'x', 3, 3, mesh, color, sock);
4459 anim_move(
'y', 3, 3, mesh, color, sock);
4460 flip_edges(mesh, color, sock, 2, NULL, NULL);
4461 anim_move(
'y', 3, 1, mesh, color, sock);
4462 anim_move(
'x', 3, 1, mesh, color, sock);
4465 flip_edges(mesh, color, sock, 2, NULL, NULL);
4468 anim_move(
'x', 1, 3, mesh, color, sock);
4469 anim_move(
'y', 3, 1, mesh, color, sock);
4470 flip_edges(mesh, color, sock, 2, NULL, NULL);
4471 anim_move(
'y', 3, 3, mesh, color, sock);
4472 anim_move(
'x', 1, 1, mesh, color, sock);
4478 anim_move(
'z', 3, (i1-2)%4, mesh, color, sock);
4479 anim_move(
'y', 3, 2, mesh, color, sock);
4480 flip_edges(mesh, color, sock, 2, NULL, NULL);
4481 anim_move(
'y', 3, 2, mesh, color, sock);
4482 anim_move(
'z', 3, (10-i1)%4, mesh, color, sock);
4488 anim_move(
'z', 2, (i1-6)%4, mesh, color, sock);
4489 anim_move(
'y', 3, 3, mesh, color, sock);
4490 flip_edges(mesh, color, sock, 2, NULL, NULL);
4491 anim_move(
'y', 3, 1, mesh, color, sock);
4492 anim_move(
'z', 2, (14-i1)%4, mesh, color, sock);
4498 anim_move(
'x', 2, 3, mesh, color, sock);
4499 anim_move(
'z', 1, 3, mesh, color, sock);
4500 anim_move(
'x', 2, 1, mesh, color, sock);
4501 anim_move(
'z', 1, 3, mesh, color, sock);
4502 anim_move(
'x', 2, 3, mesh, color, sock);
4503 anim_move(
'z', 1, 3, mesh, color, sock);
4504 anim_move(
'x', 2, 1, mesh, color, sock);
4505 anim_move(
'z', 1, 3, mesh, color, sock);
4506 anim_move(
'x', 2, 3, mesh, color, sock);
4507 anim_move(
'z', 1, 2, mesh, color, sock);
4508 anim_move(
'x', 2, 1, mesh, color, sock);
4509 anim_move(
'z', 1, 3, mesh, color, sock);
4510 anim_move(
'x', 2, 3, mesh, color, sock);
4511 anim_move(
'z', 1, 3, mesh, color, sock);
4512 anim_move(
'x', 2, 1, mesh, color, sock);
4513 anim_move(
'z', 1, 3, mesh, color, sock);
4514 anim_move(
'x', 2, 3, mesh, color, sock);
4515 anim_move(
'z', 1, 3, mesh, color, sock);
4516 anim_move(
'x', 2, 1, mesh, color, sock);
4517 anim_move(
'z', 1, 2, mesh, color, sock);
4526 for (
int i=0; i<12; i++)
4528 if ((rubik.edge_[2 * i] == e0[0] &&
4529 rubik.edge_[2 * i + 1] == e0[1]) ||
4530 (rubik.edge_[2 * i] == e0[1] &&
4531 rubik.edge_[2 * i + 1] == e0[0]))
4539 cout <<
"Location of e0 = {"<<e0[0]<<
","<<e0[1]<<
"}: " << i0 << endl;
4545 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4550 anim_move(
'z', 1, i0, mesh, color, sock);
4551 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4552 anim_move(
'z', 1, 4-i0, mesh, color, sock);
4555 anim_move(
'x', 2, 3, mesh, color, sock);
4556 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4557 anim_move(
'x', 2, 1, mesh, color, sock);
4560 anim_move(
'y', 2, 3, mesh, color, sock);
4561 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4562 anim_move(
'y', 2, 1, mesh, color, sock);
4565 anim_move(
'x', 2, 2, mesh, color, sock);
4566 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4567 anim_move(
'x', 2, 2, mesh, color, sock);
4570 anim_move(
'y', 2, 1, mesh, color, sock);
4571 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4572 anim_move(
'y', 2, 3, mesh, color, sock);
4575 anim_move(
'y', 1, 1, mesh, color, sock);
4576 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4577 anim_move(
'y', 1, 3, mesh, color, sock);
4580 anim_move(
'y', 1, 3, mesh, color, sock);
4581 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4582 anim_move(
'y', 1, 1, mesh, color, sock);
4585 anim_move(
'x', 3, 1, mesh, color, sock);
4586 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4587 anim_move(
'x', 3, 3, mesh, color, sock);
4590 anim_move(
'x', 1, 1, mesh, color, sock);
4591 flip_edges(mesh, color, sock, 4, NULL, e1, e2, e3);
4592 anim_move(
'x', 1, 3, mesh, color, sock);
4596 else if (e1 != NULL)
4600 for (
int i=1; i<12; i++)
4602 if ((rubik.edge_[2 * i] == e1[0] &&
4603 rubik.edge_[2 * i + 1] == e1[1]) ||
4604 (rubik.edge_[2 * i] == e1[1] &&
4605 rubik.edge_[2 * i + 1] == e1[0]))
4613 cout <<
"Location of e1: " << i1 << endl;
4619 flip_edges(mesh, color, sock, 4, NULL, NULL, e2, e3);
4622 anim_move(
'y', 3, 1, mesh, color, sock);
4623 anim_move(
'x', 3, 1, mesh, color, sock);
4624 flip_edges(mesh, color, sock, 4, NULL, NULL, e2, e3);
4625 anim_move(
'x', 3, 3, mesh, color, sock);
4626 anim_move(
'y', 3, 3, mesh, color, sock);
4629 anim_move(
'y', 2, 1, mesh, color, sock);
4630 flip_edges(mesh, color, sock, 4, NULL, NULL, e2, e3);
4631 anim_move(
'y', 2, 3, mesh, color, sock);
4637 anim_move(
'z', 3, (i1-1)%4, mesh, color, sock);
4638 anim_move(
'x', 3, 2, mesh, color, sock);
4639 flip_edges(mesh, color, sock, 4, NULL, NULL, e2, e3);
4640 anim_move(
'x', 3, 2, mesh, color, sock);
4641 anim_move(
'z', 3, (9-i1)%4, mesh, color, sock);
4647 anim_move(
'z', 2, (i1-5)%4, mesh, color, sock);
4648 anim_move(
'x', 3, 3, mesh, color, sock);
4649 flip_edges(mesh, color, sock, 4, NULL, NULL, e2, e3);
4650 anim_move(
'x', 3, 1, mesh, color, sock);
4651 anim_move(
'z', 2, (13-i1)%4, mesh, color, sock);
4655 else if (e2 != NULL)
4659 for (
int i=2; i<12; i++)
4661 if ((rubik.edge_[2 * i] == e2[0] &&
4662 rubik.edge_[2 * i + 1] == e2[1]) ||
4663 (rubik.edge_[2 * i] == e2[1] &&
4664 rubik.edge_[2 * i + 1] == e2[0]))
4672 cout <<
"Location of e2: " << i2 << endl;
4678 flip_edges(mesh, color, sock, 4, NULL, NULL, NULL, e3);
4681 anim_move(
'x', 1, 3, mesh, color, sock);
4682 anim_move(
'y', 3, 1, mesh, color, sock);
4683 flip_edges(mesh, color, sock, 4, NULL, NULL, NULL, e3);
4684 anim_move(
'y', 3, 3, mesh, color, sock);
4685 anim_move(
'x', 1, 1, mesh, color, sock);
4691 anim_move(
'z', 3, (i2-2)%4, mesh, color, sock);
4692 anim_move(
'y', 3, 2, mesh, color, sock);
4693 flip_edges(mesh, color, sock, 4, NULL, NULL, NULL, e3);
4694 anim_move(
'y', 3, 2, mesh, color, sock);
4695 anim_move(
'z', 3, (10-i2)%4, mesh, color, sock);
4701 anim_move(
'z', 2, (i2-6)%4, mesh, color, sock);
4702 anim_move(
'y', 3, 3, mesh, color, sock);
4703 flip_edges(mesh, color, sock, 4, NULL, NULL, NULL, e3);
4704 anim_move(
'y', 3, 1, mesh, color, sock);
4705 anim_move(
'z', 2, (14-i2)%4, mesh, color, sock);
4709 else if (e3 != NULL)
4713 for (
int i=3; i<12; i++)
4715 if ((rubik.edge_[2 * i] == e3[0] &&
4716 rubik.edge_[2 * i + 1] == e3[1]) ||
4717 (rubik.edge_[2 * i] == e3[1] &&
4718 rubik.edge_[2 * i + 1] == e3[0]))
4726 cout <<
"Location of e3: " << i3 << endl;
4732 flip_edges(mesh, color, sock, 4, NULL, NULL, NULL, NULL);
4738 anim_move(
'z', 3, (i3-3)%4, mesh, color, sock);
4739 anim_move(
'x', 1, 2, mesh, color, sock);
4740 flip_edges(mesh, color, sock, 4, NULL, NULL, NULL, NULL);
4741 anim_move(
'x', 1, 2, mesh, color, sock);
4742 anim_move(
'z', 3, (7-i3)%4, mesh, color, sock);
4748 anim_move(
'z', 2, (i3-4)%4, mesh, color, sock);
4749 anim_move(
'x', 1, 3, mesh, color, sock);
4750 flip_edges(mesh, color, sock, 4, NULL, NULL, NULL, NULL);
4751 anim_move(
'x', 1, 1, mesh, color, sock);
4752 anim_move(
'z', 2, (12-i3)%4, mesh, color, sock);
4758 anim_move(
'x', 2, 3, mesh, color, sock);
4759 anim_move(
'z', 1, 2, mesh, color, sock);
4760 anim_move(
'x', 2, 1, mesh, color, sock);
4761 anim_move(
'z', 1, 2, mesh, color, sock);
4762 anim_move(
'x', 2, 3, mesh, color, sock);
4763 anim_move(
'z', 1, 3, mesh, color, sock);
4764 anim_move(
'x', 2, 1, mesh, color, sock);
4765 anim_move(
'z', 1, 2, mesh, color, sock);
4766 anim_move(
'x', 2, 3, mesh, color, sock);
4767 anim_move(
'z', 1, 2, mesh, color, sock);
4768 anim_move(
'x', 2, 1, mesh, color, sock);
4769 anim_move(
'z', 1, 1, mesh, color, sock);