Skip to content

Instantly share code, notes, and snippets.

View rafiamafia's full-sized avatar

Rafia Qutab rafiamafia

  • NASA Jet Propulsion Laboratory
  • Los Angeles, CA
View GitHub Profile
@rafiamafia
rafiamafia / ttt.rb
Created September 14, 2012 16:01 — forked from JoshCheek/ttt.rb
Tic Tac Toe - procedural with few abstractions, ~110 loc
UNMARKED = ' '
def board_to_s board
board.each_slice(3).map { |a, b, c| " #{a} | #{b} | #{c} " }.join("\n---|---|---\n")
end
def display board, after_board = nil
puts board_to_s board
puts after_board if after_board
end
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Blue Component</key>
<real>0.19370138645172119</real>
<key>Green Component</key>
<real>0.15575926005840302</real>