Problem scenario
You want to write a Tic-Tac-Toe program in Ruby. What should you do?
Solution
# Tic-tac-toe game in Ruby. Written by continualintegration.com.
# We know Ruby is object-oriented. Ideally we will re-write this to encapsulate all logic in objects.
puts “This is a two player game of tictactoe. One person can pretend to be the other player.”
puts “Both players should share a keyboard and monitor.”
puts “The legend for squares in the grid is as follows: ”
puts ” ”
puts “***************************************************************”
puts “ltc is left-top-corner, …
Continue reading “How Do You Write a Tic-Tac-Toe Program in Ruby?”