In this research program, we investigate the common cup-turning problem. First, we make the flow chart of the (cup-turning) process. Secondly, we transfer the problem into computer games with the help of programming language. It helps students to understand the mathematical problems behind the cup-turning process when they are playing the game.