()
| 95 | class Fall(Exception): pass |
| 96 | |
| 97 | def remove_full_lines(): |
| 98 | global shaft, width, height |
| 99 | def line_full(line): |
| 100 | global width |
| 101 | for x in range(width): |
| 102 | if line[x] == empty: |
| 103 | return False |
| 104 | return True |
| 105 | |
| 106 | def remove_line(y): |
| 107 | global shaft, width |
| 108 | del shaft[y] # cut out line |
| 109 | shaft.insert(0, [ empty ] * width) # fill up with an empty line |
| 110 | |
| 111 | for y in range(height): |
| 112 | if line_full(shaft[y]): |
| 113 | remove_line(y) |
| 114 | |
| 115 | def fall_delay(): |
| 116 | return 1.3 # cheap version; implement raising difficulty here |
no test coverage detected