Now that we have examined the functional aspects of Java 8, we can use them to create more elegant and succinct applications. In this chapter, we will demonstrate many of the concepts discussed in this book to build a game engine. This application is simple enough to develop quickly, at least our version of a game engine, and has enough features to permit the use of functional programming techniques.
The game engine developed in this chapter is a Zork-like, text-based game. It will not be full featured, but will provide enough framework to demonstrate functional programming techniques and can serve as a basis for a more complete game should you desire to expand it.
We will begin with a discussion of the features of this game, which we will call functional Zork. The discussion is followed by a detailed explanation of the various parts of the game.