Skip to content
0:00 / 0:00

#haskell#tic-tac-toe#functionalprogramming

[Part 2] Tic-tac-toe Game in Haskell -- Procedural vs Functional

Tsoding

165K subscribers • 26 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Linked in the descriptiontsoding/profun
  • May be out of date. Uploaded 8 years ago, in an area where tools change fast.

Intermediate. Assumes working knowledge.

49K views8 years ago1 recommendation

Programming languagesGame developmentHaskellFunctional programmingGame programming

Tsoding implements a Tic-tac-toe game in Haskell, comparing procedural and functional programming approaches.

Source Code: github.com/tsoding/profun Waste Your Money: patreon.com/tsoding

Why it's here

1 person recommends this

u/reximkutin r/haskell • Recommends

Tic-Tac-Toe Game in Haskell -- Procedural vs Functional Part 2

u/Lolman8D8Din r/functionalprogramming • Mentions

On “If I want a functional version of TicTacToe, where should I store the board's state?”

I'd say that you can model the state as an input to a recursive function. That way, you can run the game loop in a "pure" way except for the user input, which is inherently impure. See this video for a procedural example of tic-tac-toe in C, and then this follow up video for a pure functional version in haskell! Haskell is really good for showing this concept off because of it being a pure functional language.

u/anton_richin r/haskell • Mentions

On “Functional languages to build an interface”

What about gloss or sdl? An example gloss app "tictactoe": [video by Tsoding.

u/anton_richin r/haskell • Mentions

On “Looking for Haskell example programs”

Poker: https://github.com/therewillbecode/poker-maison Originally found here on reddit: https://www.reddit.com/r/haskell/comments/co12ox/i\_made\_a\_poker\_site\_with\_haskell/ When I google or do search on reddit I usually look for something specific like: mazes in Haskell, etc. TicTacToe by Tsoding Video: [video Source code: https://github.com/tsoding/profun/tree/master/functional