generated from mwc/project_game
Installed retro and got a cursor that moves...
Need to do: -Populate 10 mines randomly -Have the game end when a mine is selected (figure out how to select something) -Figure out an algorithm to reveal squares -Figure out how to show numbers in revealed squares -Add flag functionality?
This commit is contained in:
12
minesweeper_game.py
Normal file
12
minesweeper_game.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# minesweeper_game.py
|
||||
# ------------
|
||||
# By Cory
|
||||
# This class implements a simple minesweeper game on a 9x9 gird.
|
||||
from retro.game import Game
|
||||
from cursor import Cursor
|
||||
|
||||
board_size = (9, 9)
|
||||
cursor = Cursor(board_size)
|
||||
# spawner = AsteroidSpawner(board_size)
|
||||
game = Game([cursor], {"score": 0}, board_size=board_size)
|
||||
game.play()
|
||||
Reference in New Issue
Block a user