The ability of computational thinking can be improved through learning programming design and practicing logical thinking and problem-solving skills. However, the cognitive load of programming courses can be heavy, and students from various majors may not have sufficient knowledge about computer science. To address this, innovative teaching methods and content should be considered to reduce learning anxiety and improve motivation and performance. This study aims to redesign the Python programming course. In the first stage, a traditional lecture will be used to teach the basic concepts of programming. The CodeCombat platform will be introduced in the second stage, utilizing game-based learning strategies to teach Python programming. In the third stage, the curriculum will integrate the Pygame module for game design and implementation. After each stage of implementation, students will be given a questionnaire on learning motivation. The questionnaire will collect data on students' motivations, student work, and student thoughts for statistical analysis. According to the statistical results, the overall average score of students' learning motivation in the third stage is the highest, while the first stage has the lowest score. Therefore, it can be concluded that the teaching method of learning programming through game design is most effective in improving students' motivation to learn.