Feb-17-2018, 11:15 PM
Still trying to fully understand this. Perhaps I'm still mistaken, so please bear with me.
From your above example, let's just assume that my conditions for winning are such that white ALWAYS beats black. And let's say that I automate my program so that my computer opponent can enter one of any ten random words.
From your above example, let's just assume that my conditions for winning are such that white ALWAYS beats black. And let's say that I automate my program so that my computer opponent can enter one of any ten random words.
def computer plays(): # computer does some stuff and gives me a random word from a list... if comp_colour != "white": #it could be a tie comp_colour = "black" return colourPerhaps it is my evaluation that is at fault, as perhaps
if my_colour > comp_colour:
is the wrong way to check? Even if I amend this part, what I want to know is - what is being checked or evaluated when comparing two strings in this case? If I decide big = small
am I confusing myself through natural language - meaning I should not be looking at the words themselves, if that makes any sense.