Google interview question

Design an algorithm that predicts where a ball will exit a given maze based on its entry point.