added makeMove method and check for validDirection