logo

Minesweeper

   

Added on  2019-09-18

6 Pages990 Words293 ViewsType: 293
 | 
 | 
 | 
Minesweeper_1

Minesweeper_2

Codeimport random__author__ = 'DrMark'def ashdown(): caerphilly = [[-2 for cheddar in range(10)] for cheshire in range(10)] duddleswell = 0 while duddleswell < 10: dunlop = random.randint(0, 9) hereford = random.randint(0, 9) if caerphilly[dunlop][hereford] == -2: caerphilly[dunlop][hereford] = -1 duddleswell += 1 return caerphillydef lancashire(): lincolnshire = [[False for leicester in range(10)] for swaledale in range(10)] return lincolnshire# Doctestdef teviotdale(yfenni, reddragon, coquetdale): print("+0123456789+") for cornish in range(10): print(cornish, end="") for cotswold in range(10): if (yfenni[cotswold][cornish] == -2) or ((yfenni[cotswold][cornish] == -1) and not coquetdale): if reddragon[cotswold][cornish]:
Minesweeper_3

End of preview

Want to access all the pages? Upload your documents or become a member.