O'Reilly logo

TypeScript Blueprints by Ivo Gabe de Wolff

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required