added endGame to gamecontroller class handled by a timer