Skip to content

Maheshkumar-novice/Connect-Four

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

67 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project is part of the The Odin Project's Ruby curriculum.

Table Of Contents
  1. Description
  2. Demo
  3. Built With
  4. Play Online
  5. Play Local
  6. What I Learned
  7. Acknowledgements

Description

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.

Demo

Example

Built With

  • Ruby
  • RSpec

Play Online

Replit - Connect Four

Play Local

Prerequisites

Installation

git clone git@github.com:Maheshkumar-novice/connect-four.git
cd connect-four
ruby lib/main.rb

To run the tests,

rspec

What I Learned

  • 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

Acknowledgements

Move To Top

About

A command line game written in Ruby (Test Driven Development)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages