Skip to content

Instantly share code, notes, and snippets.

View luizdepra's full-sized avatar
🐶

Luiz F. A. de Prá luizdepra

🐶
View GitHub Profile
@luizdepra
luizdepra / spiralflood.py
Created June 20, 2012 17:08
Spiral Water Flood
# Dont work =(
tiles = []
def spiralFlood(tiles, sx, sy, K, m):
x = y = 0
dx = 0
dy = -1
i = 0
while i < m and i < K*K: