>>> from partida import PartidaSE >>> t = PartidaSE(34) >>> t.num_caselles 34 >>> t.pos_blau, t.pos_groc (1, 1) >>> t.nombre_serps() 0 >>> t[1], t[10], t[22] (0, 0, 0) >>> t.afegir_serp(14, 5) >>> t.afegir_serp(30, 17) >>> t.afegir_serp(33, 10) >>> t.nombre_serps() 3 >>> t[14], t[30], t[33] (5, 17, 10) >>> t[2], t[11], t[34] (0, 0, 0) >>> t.pos_groc = 3 >>> t.guanyant() 3 >>> t.pos_blau = 7 >>> t.guanyant() 7 >>> t.mou_fitxa('groc', 5) >>> t.pos_groc 8 >>> t.guanyant() 8 >>> t.mou_fitxa('groc', 6) >>> t.pos_groc 5 >>> t.guanyant() 7 >>> for d in [2, 3, 5, 5, 6, 6, 6, 5, 1]: ... t.mou_fitxa('groc', d) ... print(t.pos_groc, end=',') 7,10,15,20,26,32,34,34,34, >>> t.guanyant() 34