Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Infect a few random people
- to_infect = 10
- for i in range( to_infect ):
- cell_available = False
- while not( cell_available ):
- x = random.randint( int( grid_width / 2 ) , grid_width - 1 )
- y = random.randint( int( grid_height / 2 ) , grid_height - 1 )
- cell_available = ( grid[ y ][ x ] == 1 )
- grid[ y ][ x ] = 2
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement