This project allows two players to play Chess against each other using a CLI (command-line interface) on one machine. The players take turns inputting the positions of pieces and where they want to move them. The positions are picked using chess algebraic notation.
Click here to see a live-preview hosted on Replit.
- Ruby: language used
- RSpec: testing framework
- SimpleCov: code coverage analysis tool
- https://neovim.io/: for J K enjoying
This project is the final project of The Odin Project's Ruby course. In the course, they teach basics of Ruby, OOP (object-oriented programming), some CS (computer science), and TDD (test-driven development). All this information is put to use in this project.
The project began with the premise of TDD, but it eventually evolved away from it. New features were 'requested' by first creating an acceptance test of some kind in RSpec. Then unit tests were written to try to TDD out the required pieces to pass the acceptance tests. Many of these beginning unit tests were refactored away.
A big lesson taken from this project was learning to get features working and moving on. The temptation to refactor and refactor and refactor to seek the ultimate OOP dream was high.
Some design patterns were played with in this project. One of these patterns was the Null Object Pattern that was discovered after abusing safe navigation (&.
) frequently. Another was pipelining (see Chess#send_move
).
- Lucas, my First Ruby Friend mentor. Thank you so much for meeting with me regularly and advising me on this project! Your help was and has been invaluable!
- The Odin Project, my primary guide in the vast sea of web-development learning.
- For providing this project idea (see the instructions for this assignment here)
- And the Discord community!
- Sandi Metz, whose book Practical Object-Oriented Design helped me immensely on this project. She has been my favorite guide as I wander in the world of OOP.
Bug reports are greatly appreciated. You may create a new issue with a description of the problem, and the steps leading up to it.
PRs are kindly appreciated.
You may also contact me at: [email protected]