Giter Site home page Giter Site logo

ruby-tic-tac-toe's Introduction

Ruby Tic-Tac-Toe

Ruby's Tic-Tac-Toe Project

In this project, we have created a game of Tic-Tac-Toe using:

  • Classes for board and player instances
  • An Interface loop
  • Win check method
  • Turn input validity methods
  • Player name validity check
  • Restart method

Setup

  • Download or clone the repository's files github repo
  • Have Ruby 2.7 installed (to check if it is installed you can run: ruby -version in your console)
  • Once repo is downloaded to local directory, in you console run cmd: ruby bin/main.rb
  • Enjoy the game!

How to Play

  • Tic-Tac-Toe is a two player game were each must try to place three of their tokens in a row, vertically, horizontally or diagonally, in a three by three board to win.

  • Game board will be displayed in a coordinate table from a to c (lines) and 1 to 3 (columns), Example input a1 will place token in the first line and first column.

    screenshot

  • At the beginning each player will be asked to input their name's and token of preference.

  • After which a random player will picked to start and place a token.

  • Each player take turns to place a token until one has won or the game is a draw

  • Once game is over player may restart by typing "y" in the console or exit by typing "n".

Screenshot

screenshot screenshot

Built With

  • Code editor: VsCode
  • Language: Ruby
  • Linters: Rubocop, Rspec

Live Demo

Live Demo Link

Prerequisites

  • Browser (Google Chrome, Mozilla Firefox, Safari or any other browser)

Authors

๐Ÿ‘ค Youcef Abdellani

๐Ÿ‘ค Jurgen Clausen Gutierrez

๐Ÿค Contributing

Contributions, issues and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a โญ๏ธ if you like this project!

Acknowledgments

  • Microverse
  • GitHub
  • TheOdinProject
  • Ruby

๐Ÿ“ License

This project is MIT licensed.

ruby-tic-tac-toe's People

Contributors

jurgen1c avatar abdellani-youcef avatar rocio01 avatar

Stargazers

German Renato Cobian avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.