Games for learning are currently used in several disciplines for motivating students and enhancing their learning experience. This new approach of technology-enhanced learning has attracted researchers' and instructors' attention in the area of programming that is one of the most cognitively demanding fields in Computer Science. Several educational, or else serious, games for learning programming have been developed and the first results of their evaluation as a means of learning are quite positive. In this paper, we propose using arcade games as a means for learning programming. Based on this approach students first play a simple game, such as Snake or Tetris, study its code and then extend it. In a pilot study carried out in the context of an undergraduate programming course, students studied the source code of the well-known game Snake and extended it with new functionalities. The analysis of students' replies in a questionnaire showed that using arcade games as a means of learning programming concepts enhances students' motivation for learning programming, supports them in comprehending complex concepts and engages them in carrying out programming activities.