Move game_phase() to material.cpp