# Programming Assignment #10: Fire Background Information: As you h...

## Solution Preview

These solutions may offer step-by-step problem-solving explanations or good writing examples that include modern styles of formatting and construction of bibliographies out of text citations and references. Students may use these solutions for personal skill-building and practice. Unethical use is strictly forbidden.

from DrawingPanel import *
import random

PROPAGATION_PERCENT = 75

'''
Method to load grid from file
'''
grid = []
for line in open(file):
row = line.split()
grid.append([int(x) for x in row])
return grid

'''
Method to draw grid to panel
'''
def drawGrid(grid, panel):
panel.clear()
for y in range(len(grid)):
for x in range(len(grid[y])):
if grid[y][x] == 0:
panel.canvas.create_rectangle(10*x,10*y,10*x+10,10*y+10, fill="yellow", width=0)
elif grid[y][x] == 1:
panel.canvas.create_rectangle(10*x,10*y,10*x+10,10*y+10, fill="green", width=0)
elif grid[y][x] == 2:
panel.canvas.create_rectangle(10*x,10*y,10*x+10,10*y+10, fill="red", width=0)

'''
Method to obtain next grid from current grid
'''
def nextGrid(grid):
width = len(grid[0])
height = len(grid)
nextGrid = [row[:] for row in grid]
for y in range(height):
for x in range(width):
if grid[y][x] == 1:
nextToFire = False...

By purchasing this solution you'll be able to access the following files:
Solution.zip.

# 50% discount

Hours
Minutes
Seconds
\$70.00 \$35.00
for this solution

or FREE if you
register a new account!

PayPal, G Pay, ApplePay, Amazon Pay, and all major credit cards accepted.

### Find A Tutor

View available Python Programming Tutors

Get College Homework Help.

Are you sure you don't want to upload any files?

Fast tutor response requires as much info as possible.