Skip to content

Tic Tac Toe project from the Odin Project Ruby Course

Notifications You must be signed in to change notification settings

dsbfelipe/odin-tic-tac-toe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



This project is part of The Odin Project's Ruby course. The goal of this assignment was to create a command-line version of the classic game Tic Tac Toe. Two human players take turns marking a 3x3 grid, and the game checks for a winner or a draw after each move. This project was a great way to apply object-oriented programming (OOP) concepts like classes, instance variables, and methods.

Screenshots

📝 Project Objective

The objective was to build a Tic Tac Toe game where two players could alternate turns marking the board, and the game would check for a win or draw after each move. By structuring the game into distinct classes, the project emphasized clean separation of responsibilities and maintaining the game loop until a victory or draw condition was met.

🔧 Features

  • Allows two human players to play against each other in the terminal.

  • Displays the game board between turns.

  • Players can input their row and column coordinates to mark their symbol (X or O).

  • Checks for win conditions across rows, columns, and diagonals.

  • Detects when the game results in a draw.

📖 Learnings

  • Object-Oriented Programming: Practiced structuring code using classes, instance variables, and methods for game logic.

  • Game Logic Development: Improved my ability to develop and implement rules for checking win conditions and handling edge cases like a draw.

  • User Input Validation: Gained experience in validating player inputs and handling errors.

  • Looping and Condition Handling: Strengthened my understanding of loop structures for maintaining the game flow until a result is reached.

💻 Technologies Used

  • Ruby for implementing the Tic Tac Toe game logic and user interactions.

💡 Acknowledgments

  • The Odin Project: For providing the project outline and guidance.

About

Tic Tac Toe project from the Odin Project Ruby Course

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages