Formal methods for software development are subject to teaching in computer science as a matter of course. However, it is difficult to relate the theories to the practical matter of program code creation. The reason for this is the complexity of model-driven software development approaches which would be needed to derive executable applications from formal models, but are usually not in the focus of the courses. We propose to teach formal methods by using "embedded models", i.e. program code patterns that represent the semantics of formal methods inside arbitrary object-oriented programs. The approach is realized within the Greenfoot graphical simulation enginge. With this approach the technical barrier to the practical use of formal methods is lowered, so that students can easily experiment with such models in a game-oriented environment.