added methods to check for winning and defending moves