The moment you've all been waiting for: you'll now turn all of your hard work learning about functions and data types into an actual game that you can play!
- [Instructor] In this video,…we're going to look at making the game playable.…Previously, we've been building up…functions and data types…that we can use in order to play a word game.…And now, we're going to put together those pieces.…So we're going to model the game data type.…We're going to look at input and output,…and in Haskell, that means using what's called the IO Monad,…and we're going to have a quick look…at controlling buffering.…
So we previously created a data type for cells.…Let's now create the idea of a game.…So of course the game data type needs a constructor, Game.…And we need to think about what kinds of things…we're going to store in that.…So of course, we know that we need a grid of cells,…and we might think of a list of words,…so a list of strings that are the words contained…in the game.…
And we might want an integer, for example, for the score.…But in fact, there are other ways…that we could do this.…Because if we know which of the words have been found,…we can calculate the score from that.…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Discovering Haskell with GHCI
- Haskell datatypes and functions
- Using higher order functions for data manipulation and code reuse
- Editing Haskell source code
- Creating a project with Stack
- Writing and conducting tests