Available moves for a Piece - Implementing Chess with Ruby for beginners
In this series you'll learn object oriented basics while building a basic terminal based Chess game with Ruby.
In this episode, we'll extract some of the common logic that is the same across all piece classes into a parent Piece class and setup a basic inheritance tree. Then we build Slideable and Stepable modules to share the logic for discovering available moves for all pieces that fit into those categories.
We cover:
* inheritance
* modules
Playlist: https://www.youtube.com/playlist?list=PLS6F722u-R6LZxh7mvEUvZKshcH6KSNhr
Code: https://replit.com/@CJAvilla/chess#main.rb