Products
Features
YouTube Video Summarizer
Summarize YouTube videos
Web & PDF Highlighter
Highlight web pages & PDFs
Chat with PDF
Ask any PDF questions with AI
Ask AI Clone
Chat with your highlights & memories
Audio Transcriber
Transcribe audio files to text
Glasp Reader
Read and highlight articles
Kindle Highlight Export
Export your Kindle highlights
Idea Hatch
Hatch ideas from your highlights
Integrations
Obsidian Plugin
Notion Integration
Pocket Integration
Instapaper Integration
Medium Integration
Readwise Integration
Snipd Integration
Hypothesis Integration
Apps & Extensions
Chrome Extension
Safari Extension
Edge Add-ons
Firefox Add-ons
iOS App
Android App
Discover
Discover
Ideas
Discover new ideas and insights
Articles
Curated articles and insights
Books
Book recommendations by great minds
Posts
Essays and notes from readers
Quotes
Inspiring quotes collection
Videos
Curated videos and summaries
Explore Glasp
Glasp Newsletter
Weekly insights and updates
Glasp Talk
Interview series with great minds
Glasp Blog
Latest news and articles
Glasp Use Cases
Learn how others use Glasp
Build & Support
Glasp API
Access Glasp's API for developers
MCP Connector
Connect Glasp to Claude & ChatGPT
Community
Glasp Reddit Community
Students
Student discount and benefits
FAQs
Frequently Asked Questions
AboutPricing
DashboardLog inSign up

Live Stream #116.2 - Snakes & Ladders Continued + 2048

13.2K views
•
January 28, 2018
by
The Coding Train
YouTube video player
Live Stream #116.2 - Snakes & Ladders Continued + 2048

TL;DR

In this coding challenge, the programmer attempts to create a game of Snakes and Ladders using an object-oriented approach.

Transcript

oh hello I'm back I don't know if there's a pract I didn't like post anything and schedule this I just sort of like was live-streaming earlier then I had to go downstairs for a meeting and then I thought I got to finish this when I come back now it's like almost 7:00 in the evening it's been a very long day very long week I haven't seen anyone post... Read More

Key Insights

  • 👻 The object-oriented approach allows for easier management and organization of the code for the Snakes and Ladders game.
  • 🪜 Randomly placing snakes and ladders adds variety and challenge to the game.
  • 🍵 The swipe function handles the movement of tiles based on the direction of the swipe.

Install to Summarize YouTube Videos and Get Transcripts

Explore YouTube Video Summarizer or Get YouTube Transcript Extractor

Questions & Answers

Q: What is the purpose of the "state" variable in the code?

The "state" variable is used to keep track of the current state of the game, such as the roll state, move state, and Schnatter state. It determines which actions should be taken based on the current state.

Q: Why does the code randomly place 5 pairs of snakes and ladders on the board?

The placement of snakes and ladders is meant to add complexity and unpredictability to the game. It creates obstacles and shortcuts for the player to navigate, making the game more challenging and interesting.

Q: How does the swipe function work in the code?

The swipe function takes in the direction of the swipe (up, down, left, or right) and moves the tiles on the board accordingly. It checks for valid moves based on the current position of the tiles and combines or moves them as necessary.

Q: How does the game determine when it is over?

The game checks if the player has reached or passed the last tile on the board. If the player's position is greater than or equal to the last tile, the game is considered over.

Summary & Key Takeaways

  • The programmer starts by creating a grid for the Snakes and Ladders board and displays it on the screen.

  • They then add functionality to randomly place 5 pairs of snakes and ladders on the board.

  • Next, they implement the game mechanics, including rolling the dice, moving the player, and checking for landings on snakes or ladders.

  • Finally, they add a swipe function to allow the player to swipe in a specific direction to move the tiles.


Read in Other Languages (beta)

English

Share This Summary 📚

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Explore More Summaries from The Coding Train 📚

12.2: Using Express with Node - WebSockets and p5.js Tutorial thumbnail
12.2: Using Express with Node - WebSockets and p5.js Tutorial
The Coding Train
How to Use Quad Trees for Efficient Point Retrieval thumbnail
How to Use Quad Trees for Efficient Point Retrieval
The Coding Train
Coding Challenge #111: Animated Sprites thumbnail
Coding Challenge #111: Animated Sprites
The Coding Train
Winter Show 2020 (ITP/IMA/IMA Low Res) thumbnail
Winter Show 2020 (ITP/IMA/IMA Low Res)
The Coding Train
1.2: PVector class - The Nature of Code thumbnail
1.2: PVector class - The Nature of Code
The Coding Train
2.9: Regular Expressions: replace() - Programming with Text thumbnail
2.9: Regular Expressions: replace() - Programming with Text
The Coding Train

Summarize YouTube Videos and Get Video Transcripts with 1-Click

Download browser extensions on:

Try YouTube Summary with ChatGPT & Claude or YouTube Transcript Generator

Apps & Extensions

  • Chrome Extension
  • Safari Extension
  • Edge Add-ons
  • Firefox Add-ons
  • iOS App
  • Android App

Key Features

  • YouTube Video Summarizer
  • Web & PDF Summarizer
  • Web & PDF Highlighter
  • Chat with PDF
  • Ask AI Clone
  • Audio Transcriber
  • Glasp Reader
  • Kindle Highlight Export
  • Idea Hatch

Integrations

  • Obsidian Plugin
  • Notion Integration
  • Pocket Integration
  • Instapaper Integration
  • Medium Integration
  • Readwise Integration
  • Snipd Integration
  • Hypothesis Integration

More Features

  • APIs
  • MCP Connector
  • Blog & Post
  • Embed Links
  • Image Highlight
  • Personality Test
  • Quote Shots

Company

  • About us
  • Blog
  • Community
  • FAQs
  • Job Board
  • Newsletter
  • Pricing
Terms

•

Privacy

•

Guidelines

© 2026 Glasp Inc. All rights reserved.