Coding Challenge 85: The Game of Life

Coding Challenge 85: The Game of Life

702.143 Lượt nghe
Coding Challenge 85: The Game of Life
In this coding challenge, I attempt to code Conway’s Game of Life cellular automata simulation in JavaScript using the p5.js library. Code: https://thecodingtrain.com/challenges/85-the-game-of-life 🕹️ p5.js Web Editor Sketch: https://editor.p5js.org/codingtrain/sketches/UtSMCB1zv 🎥 Next video: https://youtu.be/H81Tdrmz2LA?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH 🎥 All videos: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH References: 🗄 Conway's Game of Life on Wikipedia: https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life 📓 Mathematical Games: http://www.ibiblio.org/lifepatterns/october1970.html Videos: 🚂 My Video on The Game of Life: https://www.youtube.com/watch?v=tENSCEO-LEc 🚂 2D Arrays in JavaScript: https://www.youtube.com/watch?v=OTNpiLUSiB4 🚂 The Modulo Operator with Golan Levin: https://www.youtube.com/watch?v=r5Iy3v1co0A 🔴 Coding Train Live 108: https://youtu.be/U8S1qDjIE2Yt=8518s Related Coding Challenges: 🚂 #89 Langton's Ant: https://youtu.be/G1EgjgMo48U 🚂 #107 Sandpiles: https://youtu.be/diGjw5tghYU 🚂 #102 2D Water Ripple: https://youtu.be/BZUdGqeOD0w Timestamps: 0:00 Introduction 2:00 Generations 7:18 make2DArray() 17:20 Compute Next Generation 21:19 countNeighbors() 23:14 Deal with Edges 25:44 Implement Rules 30:00 Implement Wraparound with Modulus 36:13 Variations Editing by Mathieu Blanchette Animations by Jason Heglund Music from Epidemic Sound 🚂 Website: http://thecodingtrain.com/ 👾 Share Your Creation! https://thecodingtrain.com/guides/passenger-showcase-guide 🚩 Suggest Topics: https://github.com/CodingTrain/Suggestion-Box 💡 GitHub: https://github.com/CodingTrain 💬 Discord: https://discord.gg/hPuGy2g 💖 Membership: http://youtube.com/thecodingtrain/join 🛒 Store: https://standard.tv/codingtrain 🖋️ Twitter: https://twitter.com/thecodingtrain 📸 Instagram: https://www.instagram.com/the.coding.train/ 🎥 Coding Challenges: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6ZiZxtDDRCi6uhfTH4FilpH 🎥 Intro to Programming: https://www.youtube.com/playlist?list=PLRqwX-V7Uu6Zy51Q-x9tMWIv9cueOFTFA 🔗 p5.js: https://p5js.org 🔗 p5.js Web Editor: https://editor.p5js.org/ 🔗 Processing: https://processing.org 📄 Code of Conduct: https://github.com/CodingTrain/Code-of-Conduct This description was auto-generated. If you see a problem, please open an issue: https://github.com/CodingTrain/thecodingtrain.com/issues/new #gameoflife #cellularautomata #modulus #javascript #p5js