This project is part of the The Odin Project's Ruby curriculum.
Table Of Contents
Connect Four is a two-player game connection board game, in which the players choose a color and then take turns dropping colored discs into seven-column, six-row vertically suspended grid. The pieces fall straight down, occupying the lowest available space within the column. The objective of the game is to be the first to form a horizontal, vertical, or diagonal line of four of one's own discs. - Wikipedia.
Using Test Driven Development style, this game is developed with Ruby. RSpec is used for TDD. TDD is in simple terms, figuring out what needs to happen, writing a failing test for it, then writing the code to make that test pass and then refactoring the code.
- Ruby
- RSpec
git clone git@github.com:Maheshkumar-novice/connect-four.git
cd connect-four
ruby lib/main.rb
To run the tests,
rspec
- How to write tests with RSpec
- How to do TDD with RSpec and Ruby
- Different ways to test methods based on the inputs and outputs
- Mocks and Stubs
- Refactoring the Code
- Splitting the problem into small steps
- Planning the solution
- Writing methods that do one thing
- Played with color texts in Terminal