Ruby Project: Tic Tac Toe (Procedural Progamming)

Click here to view this project on GitHub.

This is a procedural-programming Tic Tac Toe game written in Ruby. It runs entirely in the command line and is built around a set of small, focused methods that pass state (the board) through the program.

The computer opponent includes simple strategy logic (win if possible, block if needed, take the center, otherwise choose randomly), and the game supports a “first to 5 wins” match format.

Skills demonstrated:

  •     Ruby
  •     Procedural programming
  •     Program decomposition (small, single-purpose methods)
  •     Control flow (loops, conditionals)
  •     Data structures (hashes, arrays, constants)
  •     Game logic (win detection, board state, simple AI)
  •     Input validation and user prompts

Leave a Reply

Your email address will not be published. Required fields are marked *