In this chapter, we have explored the HTML canvas. We have seen how we can design a framework to use functional programming. The framework provides abstraction around drawing on the canvas, which is not pure.
We have built the game Pac Man. The structure of this application was similar to a Flux architecture, like we saw in the previous chapter.
The enemies in this game are not very smart. They easily get stuck behind a wall. In the next chapter, we will take a look at another game, but we will only focus on the artificial intelligence (AI). We will create an application that can play Tic-Tac-Toe without losing. We will see how a Minimax strategy works and how we can implement it in TypeScript.