kopia lustrzana https://github.com/villares/sketch-a-day
				
				
				
			combinatorics example
							rodzic
							
								
									f4254b9be5
								
							
						
					
					
						commit
						7960387759
					
				
										
											Plik binarny nie jest wyświetlany.
										
									
								
							| Przed Szerokość: | Wysokość: | Rozmiar: 117 KiB Po Szerokość: | Wysokość: | Rozmiar: 53 KiB | 
|  | @ -1,6 +1,6 @@ | ||||||
| """ | """ | ||||||
| A simple example for class Combination. | Port and tweak of a simple example for class Combination. | ||||||
| fjenett 20090306 | by fjenett 20090306 | ||||||
| """ | """ | ||||||
| 
 | 
 | ||||||
| add_library('Combinatorics') | add_library('Combinatorics') | ||||||
|  | @ -22,11 +22,13 @@ def setup(): | ||||||
|     i = 0 |     i = 0 | ||||||
|     while (combinations.hasMore()): |     while (combinations.hasMore()): | ||||||
|         combination = combinations.next() |         combination = combinations.next() | ||||||
|         t = "" |         txt = "" | ||||||
|         for elem in combination: |         for n in combination: | ||||||
|             t += chars[elem]  # + " " |             elem = chars[n] | ||||||
|         fill((i * 64) % 255, 255, 255) |             txt += elem | ||||||
|         text(t, 20 + x, 20 + y * h) |         m = (int(txt, 16)) | ||||||
|  |         fill(m / 16 , 255, 255) | ||||||
|  |         text(txt, 20 + x, 20 + y * h) | ||||||
|         x += w |         x += w | ||||||
|         if x > width - 50: |         if x > width - 50: | ||||||
|             x = 0 |             x = 0 | ||||||
|  |  | ||||||
		Ładowanie…
	
		Reference in New Issue
	
	 villares
						villares