Carte atirage aleatoire
Author: Daniel Mentrard

Új osztás

cartes: {image1, image2, image3, image4, image5, image6, image7, image8, image9, image10, image11, image12, image13, image14, image15, image16, image17, image18, image19, image20, image21, image22, image23, image24, image25, image26, image27, image28, image29, image30, image31, image32, image33, image34, image35, image36, image37, image38, image39, image40, image41, image42, image43, image44, image45, image46, image47, image48, image49, image50, image51, image52}
n = 5 (slider from 1 to 5, step 1)
liste1 = Sequence(Random[1, 52 - k], k, 0, n - 1)
liste2 = Sequence(k, k, 1, 52)
carte1 = Element(liste1, 1)
liste3 = KeepIf(x ≠ carte1, liste2)
carte2 = Element(liste3, Element[liste1, 2])
liste4 = KeepIf(x ≠ carte2, liste3)
carte3 = Element(liste4, Element[liste1, 3])
liste5 = KeepIf(x ≠ carte3, liste4)
carte4 = Element(liste5, Element[liste1, 4])
A1 = Mod(carte1, 13)
B1 = Mod(carte2, 13)
C1 = Mod(carte3, 13)
D1 = Mod(carte4, 13)
A3: A1 - B1
A4: A1 - C1
A5: A1 - D1
A6: B1 - C1
A7: B1 - D1
A8: C1 - D1
B3: abs(sgn(A3))
B4: abs(sgn(A4))
B5: abs(sgn(A5))
B6: abs(sgn(A6))
B7: abs(sgn(A7))
B8: abs(sgn(A8))
B9 = Sum(B3:B8)
A = (-24.143917636337942, 21.282509958627422)
B = (-4.260263398317595, 21.188473803277358)
C = (15.085994779215715, 21.43892378265656)
D = (11.55752048682742, 15.107916881855612)
Cart1 = Element(cartes, carte1)
u = Vector(A, B)
Cart2 = Translate(Element[cartes, carte2], u)
Cart3 = Translate(Element[cartes, carte3], Vector[(2 * u)])
Cart4 = Translate(Element[cartes, carte4], Vector[(3 * u)])
liste6 = KeepIf(x ≠ carte4, liste5)
carte5 = Element(liste6, Element[liste1, 5])
Cart5 = Translate(Element[cartes, carte5], Vector[(4 * u)])
E1 = Mod(carte5, 13)
E3: A1 - B1
E4: A1 - C1
E5: A1 - D1
E6: A1 - E1
E7: B1 - C1
E8: B1 - D1
E9: B1 - E1
E10: C1 - D1
E11: C1 - E1
E12: D1 - E1
F3: abs(sgn(E3))
F4: abs(sgn(E4))
F5: abs(sgn(E5))
F6: abs(sgn(E6))
F7: abs(sgn(E7))
F8: abs(sgn(E8))
F9: abs(sgn(E9))
F10: abs(sgn(E10))
F11: abs(sgn(E11))
F12: abs(sgn(E12))
F13 = Sum(F3:F12)