Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Steven Seebode
2,631 PointsCartographer: I have 2 player "X" on map, not sure why...?
Here is my code, I followed along but I am getting two player locations, not sure why
def draw_map(player):
print(" _" * 5)
tile = "|{}"
for cell in CELLS:
x, y = cell
if x < 4:
line_end = ""
if cell == player:
output = tile.format("X")
else:
output = tile.format("_")
else:
line_end = "\n"
if cell == player:
output = tile.format("X|")
else:
output = tile.format("_|")
print(output, end=line_end)

Steven Parker
241,488 PointsThis is a great example of why it's important to include the whole code with a question. Since the CELLS array wasn't originally shown, it would not have been possible for anyone to find the cause of the issue!
1 Answer

Steven Seebode
2,631 PointsThanks for the re-assurance on that. I felt like I was including too much code but I will keep this in mind in the future to just include all my code

Steven Parker
241,488 PointsWhen using the workspaces, you can always include a link to a "snapshot" which contains all the code but doesn't take up any room in the question.
Steven Seebode
2,631 PointsSteven Seebode
2,631 PointsI figured out the issue, I had duplicates/typos in my CELLS tuple, correct list is