Added code to write the movelist to a text file

Updated logic for checking conditions, with the tuple containing a field for initial move and capturing seperately