In this chapter, we have developed more advanced versions of the games of the previous chapter. In both Othello and Noughts and Crosses, we have added code that lets the computer play against the human. In Othello, we looked for the position in the game grid that would cause the highest number of the opponent’s marks to be changed. In Noughts and Crosses, we searched for the move that gave the computer the highest possible number of marks in a row, preferably five in a row. However, we also had to search for the potential number of marks in a row for the opponent, and prevent their next move if it led to victory. Now, I suggest that you sit back and enjoy a couple of rounds with the computer before moving on to the next chapter.
In the next chapter, we will start developing a Domain-Specific Language (DSL), which is a language intended for a specific domain. We will develop a DSL for specifying the drawings of graphical objects, such as lines, rectangles, ellipses, and text, as well...