Tell us what’s happening:
I’ve tried everything possible to requirements 11 12 13 help please
Your code so far
from abc import ABC, abstractmethod
class Player(ABC):
def __init__(self):
self.moves = []
self.position = (0, 0)
self.path = [self.position]
def make_move(self):
import random
random_move = random.choice(self.move)
new_position = (self.position[0] + random_move[0],
self.position[1] + random_move[1])
self.position = new_position
self.path.append(self.position)
return self.position
@abstractmethod
def level_up(self):
pass
class Pawn(Player):
def __init__(self):
super().__init__()
self.moves = [(0, 1), (0, -1), (-1, 0), (1, 0)]
def level_up(self):
self.moves += [(1,1),(1,-1),(-1,-1),(1, -1)]
pawn = Pawn()
print(pawn.position)
pawn.make_move
print(pawn.position)
print(pawn.path)
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 Edg/142.0.0.0
Challenge Information:
Build a Player Interface - Build a Player Interface