Update movegen.cpp

Union three if to one if