generated from mwc/project_game
14 lines
396 B
Python
14 lines
396 B
Python
# mine.py
|
|
# ------------
|
|
# By Cory
|
|
# This module defines a mine agent class. It doesn't do anything except exist in a position
|
|
class Mine:
|
|
display = False
|
|
|
|
def __init__(self, position):
|
|
self.position = position
|
|
|
|
def play_turn(self, game):
|
|
if not game.is_empty(self.position):
|
|
game.log("You hit a mine at " + str(self.position) + ".")
|
|
game.end() |