rename input.txt to input_greedy.txt
define state pass the name of char array: board, legal_direction