Teaching software engineers presents some specific problems. There are modern approaches that may make the education process easier and more appealing. A remarkably promising example of this is the use of computer games in the teaching and learning process. We suggest a methodology of two-fold use of learning games for teaching software engineers. Students, experienced in programming, develop learning games, and then we use the games that are developed for teaching the next generation of students. After gaining skills in basic subjects these students are involved in the development of new learning games. Teachers in our department play the role of customer, as they are interested in getting new effective tools for teaching and are ready to participate in our work. Students developing games learn all the software development life cycle phases including testing, deployment and maintenance, they contact real customers (teachers of corresponding subjects) and real users (students, learning these subjects). Student teams have developed several games that are used for teaching new students. Students, who participated in game development, gained such important professional skills as software design, testing, debugging and development; working with open source libraries, version controls systems, other modern tools and domain-specific programming languages. Students were also trained in soft skills such as team working, project management, and conflict resolution. Teachers, using games as learning systems, notice an improvement in students' motivation in learning and their will to be involved into the learning process. Our experience of using computer games shows that this approach is very effective for improving students' skills and motivation to study.