implementing phi to te game