Phase transition in random walks coupled with evolutionary game