home *** CD-ROM | disk | FTP | other *** search
- on InitFaseVars
- global glbWQC
- set glbWQC to "ini"
- end
-
- on PrepareGame wp
- global initabuleiro, numpecas
- set t to []
- set pospecas to []
- set col to 6
- set lin to 6
- set initabuleiro to 1
- set numpecas to col * lin
- repeat with i = 1 to numpecas
- setAt(t, i, i)
- end repeat
- repeat with j = 1 to numpecas
- set r to random(numpecas)
- repeat while getAt(t, r) = 0
- set r to random(numpecas)
- end repeat
- setAt(t, r, 0)
- setAt(pospecas, j, r)
- end repeat
- repeat with j = 1 to numpecas
- set p to initabuleiro + j
- puppetSprite(p, 1)
- set nam to string(getAt(pospecas, j))
- if length(nam) < 2 then
- set nam to "0" & nam
- end if
- set nam to wp & nam
- set the castNum of sprite p to cast nam
- end repeat
- end
-
- on verifyfinish
- global initabuleiro, numpecas
- set term to 1
- repeat with i = 1 to numpecas
- set n to the name of cast the castNum of sprite (initabuleiro + i)
- if value(chars(n, 2, 5)) <> i then
- set term to 0
- exit repeat
- end if
- end repeat
- if term then
- alert("ganhou")
- go(the frame + 1)
- end if
- end
-