From 39e6d73db2475482849f554e7b3cf182d06bd502 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Mon, 14 Oct 2013 15:58:01 -0700
Subject: [PATCH 01/13] Thomas' homework

---
 week1/homework/questions.txt             | 12 ++++++++++++
 week1/homework/strings_and_rspec_spec.rb | 11 ++++++-----
 2 files changed, 18 insertions(+), 5 deletions(-)

diff --git a/week1/homework/questions.txt b/week1/homework/questions.txt
index bd581a6..33298e8 100644
--- a/week1/homework/questions.txt
+++ b/week1/homework/questions.txt
@@ -4,12 +4,24 @@ p.86-90 Strings (Strings section in Chapter 6 Standard Types)
 
 1. What is an object?
 
+An object is anything "we manipulate in Ruby." This would not, for example, include variables, because a variable is merely a reference to an object.
+
 2. What is a variable?
 
+A variable is a reference to an object.
+
 3. What is the difference between an object and a class?
 
+A class is an object, but an object is not necessarily a class. Any class is an object of the class Class, and like any object it will inherit relevant class properties. However unlike a class a non-class object will not contain methods or reference a superclass.
+
 4. What is a String?
 
+Strings are sequences of characters. They are objects of class String.
+
 5. What are three messages that I can send to a string object? Hint: think methods
 
+chomp, split, count
+
 6. What are two ways of defining a String literal? Bonus: What is the difference between the two?
+
+You can define a string literal by wrapped text in either single quotes or double quotes. The difference between the two is that a double quoted string can support more escape sequences.
\ No newline at end of file
diff --git a/week1/homework/strings_and_rspec_spec.rb b/week1/homework/strings_and_rspec_spec.rb
index ea79e4c..725d309 100644
--- a/week1/homework/strings_and_rspec_spec.rb
+++ b/week1/homework/strings_and_rspec_spec.rb
@@ -12,14 +12,15 @@
 		before(:all) do
 			@my_string = "Renée is a fun teacher. Ruby is a really cool programming language"
 		end
-		it "should be able to count the charaters"
-		it "should be able to split on the . charater" do
-			pending
-			result = #do something with @my_string here
+		it "should be able to count the characters" do
+			@my_string.should have(66).characters
+		end
+		it "should be able to split on the . character" do
+			result = @my_string.split('.')
 			result.should have(2).items	
 		end
 		it "should be able to give the encoding of the string" do
-			pending 'helpful hint: should eq (Encoding.find("UTF-8"))'
+			@my_string.encoding.should eq (Encoding.find("UTF-8"))
 		end
 	end
 end

From 5d164b3c2e4701a7420b5e2fd36cf3a8844d56d8 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Tue, 15 Oct 2013 19:41:09 -0700
Subject: [PATCH 02/13] banish .DS_store

---
 week2/.DS_Store | Bin 6148 -> 0 bytes
 1 file changed, 0 insertions(+), 0 deletions(-)
 delete mode 100644 week2/.DS_Store

diff --git a/week2/.DS_Store b/week2/.DS_Store
deleted file mode 100644
index 6f2aa37b766a3ea9609fe9a4a7c689f88a3f19fd..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 6148
zcmeHKyG{c!5S)b+ktj$>>0jUvtSEc|AHXA_KspqOgZ?VMi%(<r(VPydh$fnq)?=@C
zY<Y^?TL8BGJlp~s0BgD<zI<4k@4GMTq9R75^NbM>c*7Gu@UqDMJ>cAH>@kov&iL<m
zWo*EB827{T@i=&@ObSQ=DIf);fD|}Ufhwr$s}s)=T?$Bn^HadT4~_2F3#Y{Rba03k
zfVg5fjPvLvh|L4UUN|K(LbIe2lWNssSkf79mDdZW#H7Qj`LMd#szb53o#(emhxJ5_
zQa}pK6}Zgh#_Rtb{g3{CPSQ#WNP)9bz*f8a-Ih<P+PZk0*V;yZq<hXc-Hr30aENkD
jjB?C{m*bmA%Dm=t?)SneG3bm3ov5Dy*F`1;{#$_`!ZH`2


From 555fa10afe753c72258b888bcaf5c60da16a2d21 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Tue, 15 Oct 2013 19:42:49 -0700
Subject: [PATCH 03/13] add gitignore file

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
 create mode 100644 .gitignore

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4a48538
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+.DS_store
\ No newline at end of file

From 7a391bb71a2d3d3733d476342ae94dda2c562780 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Mon, 21 Oct 2013 23:17:36 -0700
Subject: [PATCH 04/13] Thomas Osborn's Week2 Homework

---
 week2/homework/questions.txt | 10 ++++++++++
 week2/homework/simon_says.rb | 21 +++++++++++++++++++++
 2 files changed, 31 insertions(+)
 create mode 100644 week2/homework/simon_says.rb

diff --git a/week2/homework/questions.txt b/week2/homework/questions.txt
index 939e42d..e43fcdd 100644
--- a/week2/homework/questions.txt
+++ b/week2/homework/questions.txt
@@ -4,10 +4,20 @@ Sharing Functionality: Inheritance, Modules, and Mixins
 
 1. What is the difference between a Hash and an Array?
 
+An array is an indexed collection of object references. A hash is also an indexed collection of object references, but with an array you index integers and in a hash you index any object type but the object is indexed with a key value. 
+
 2. When would you use an Array over a Hash and vice versa?
 
+I would use a hash over an array when I wanted the indices for the objects to be more memorable. I would use an array when the ordering of the objects matter because hashes don't have an order and arrays do.
+
 3. What is a module? Enumerable is a built in Ruby module, what is it?
 
+A module is a collection of methods and constants. Enumerable is a module that allows your 
+
 4. Can you inherit more than one thing in Ruby? How could you get around this problem?
 
+Ruby is a single inheritance language. However, Ruby can use a mixin to provide "multiple-inheritence-like" capability.
+
 5. What is the difference between a Module and a Class?
+
+Modules are collections of variables and/or methods, but are not instances of the class Class. They can however behave like a superclass by being added to a class. 
\ No newline at end of file
diff --git a/week2/homework/simon_says.rb b/week2/homework/simon_says.rb
new file mode 100644
index 0000000..eb040ea
--- /dev/null
+++ b/week2/homework/simon_says.rb
@@ -0,0 +1,21 @@
+module SimonSays
+	def echo(string)
+		string
+	end
+
+	def shout(string)
+		string.upcase
+	end
+
+	def repeat(string, n=2)
+		[string] * n * ' ' #So may variable string is now an array... I am terrible at naming ><
+	end
+
+	def start_of_word(string, n)
+		string[0..n-1]
+	end
+
+	def first_word(string, n=1)
+		string.split(/ /)[0]
+	end
+end
\ No newline at end of file

From 327c2579ec2ca6bb7e8333171624139934d4c893 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Mon, 28 Oct 2013 22:47:05 -0700
Subject: [PATCH 05/13] Week3 homework

---
 week3/homework/calculator.rb | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
 create mode 100644 week3/homework/calculator.rb

diff --git a/week3/homework/calculator.rb b/week3/homework/calculator.rb
new file mode 100644
index 0000000..c6ce7de
--- /dev/null
+++ b/week3/homework/calculator.rb
@@ -0,0 +1,18 @@
+class Calculator
+
+	def sum input
+		input.inject(0, :+)
+	end
+
+	def multiply *input
+        input.flatten.inject(:*)
+	end
+
+    def pow input1, input2
+	    input1**input2
+	end
+
+	def fac input
+		(1..input).inject(:*) || 1	
+	end
+end
\ No newline at end of file

From 4ede285716f4ce534c4c7391ce08de4d0b251b64 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Tue, 29 Oct 2013 17:45:47 -0700
Subject: [PATCH 06/13] added questions hw

---
 week3/homework/questions.txt | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/week3/homework/questions.txt b/week3/homework/questions.txt
index dfb158d..c66d9e1 100644
--- a/week3/homework/questions.txt
+++ b/week3/homework/questions.txt
@@ -6,10 +6,20 @@ Please Read:
 
 1. What is a symbol?
 
+A symbol is an immutable representation of a string.
+
 2. What is the difference between a symbol and a string?
 
+A string is mutable, a symbol is not.
+
 3. What is a block and how do I call a block?
 
+A block is code that is called with curly braces or do ... end.
+
 4. How do I pass a block to a method? What is the method signature?
 
+A block can be passed to a method with yield or it can be instantiated with an ampersand.
+
 5. Where would you use regular expressions?
+
+A regular express is useful for matching text against the contents of a string, such as when verifying the contents of a string or substituting pieces of the string.
\ No newline at end of file

From c04102e555221e9a729219567b412ef575f85c3f Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Mon, 4 Nov 2013 20:26:45 -0800
Subject: [PATCH 07/13] Complete week 4 homework

---
 week4/homework/questions.txt  | 13 +++++++++++++
 week4/homework/worker.rb      |  5 +++++
 week4/homework/worker_spec.rb | 36 +++++++++++++++++++++++++++++++++++
 3 files changed, 54 insertions(+)
 create mode 100644 week4/homework/worker.rb
 create mode 100644 week4/homework/worker_spec.rb

diff --git a/week4/homework/questions.txt b/week4/homework/questions.txt
index bc1ab7c..847ae25 100644
--- a/week4/homework/questions.txt
+++ b/week4/homework/questions.txt
@@ -3,7 +3,20 @@ Chapter 10 Basic Input and Output
 The Rake Gem: http://rake.rubyforge.org/
 
 1. How does Ruby read files?
+
+Ruby reads files through the File class, with the command File.open("file", "r") {|n| n.gets} 
+
 2. How would you output "Hello World!" to a file called my_output.txt?
+
+File.open("output", "w") {|n| n.puts "Hello World!"}
+
 3. What is the Directory class and what is it used for?
+
+Objects in the directory class represent file directories on the computer, and it is used to list those directories and see thecontents.
 4. What is an IO object?
+
+Your mom... is not an IO object. An IO object is an object of the class IO and is a representation of a source file, which allows for external communication with computer resources. 
+
 5. What is rake and what is it used for? What is a rake task?
+
+Rake is Ruby make. It is for writing automation scripts and making dependecies, as well as grouping together like-tasks, kind of like you would with a module. A rank task is merely the set of commands Ruby uses to do those things I just mentioned.
\ No newline at end of file
diff --git a/week4/homework/worker.rb b/week4/homework/worker.rb
new file mode 100644
index 0000000..5e7458c
--- /dev/null
+++ b/week4/homework/worker.rb
@@ -0,0 +1,5 @@
+class Worker
+	def self.work i = 1
+		i.times.inject(0) {yield if block_given?}
+	end
+end
\ No newline at end of file
diff --git a/week4/homework/worker_spec.rb b/week4/homework/worker_spec.rb
new file mode 100644
index 0000000..8fd0f70
--- /dev/null
+++ b/week4/homework/worker_spec.rb
@@ -0,0 +1,36 @@
+require "#{File.dirname(__FILE__)}/worker"
+ 
+ describe Worker do
+ 
+   it "executes a block and returns a string" do
+     result = Worker.work do
+       "hello"
+     end
+     result.should == "hello"
+   end
+ 
+   it "executes a block and returns a number" do
+     result = Worker.work do
+       3 + 4
+     end
+     result.should == 7
+   end
+ 
+   it "executes a block in the context of the calling method" do
+     n = 1
+     result = Worker.work do
+       n + 4
+     end
+     result.should == 5
+end
+ 
+ 
+   it "executes a block 3 times and returns the result" do
+     n = 5
+     result = Worker.work(3) do
+       n += 1
+     end
+     result.should == 8
+   end
+ 
+ end
\ No newline at end of file

From 52e4c5ec331d727a6117a91f0a11f14d5d472a92 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Tue, 5 Nov 2013 11:57:19 -0800
Subject: [PATCH 08/13] made worker.rb more succinct

---
 week4/homework/worker.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/week4/homework/worker.rb b/week4/homework/worker.rb
index 5e7458c..a338182 100644
--- a/week4/homework/worker.rb
+++ b/week4/homework/worker.rb
@@ -1,5 +1,5 @@
 class Worker
 	def self.work i = 1
-		i.times.inject(0) {yield if block_given?}
+		i.times.inject(0){yield}
 	end
 end
\ No newline at end of file

From d30e0fea8398e163da8e20d45a1f0b8726bb3727 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Fri, 29 Nov 2013 17:54:48 -0800
Subject: [PATCH 09/13] week 7 homework

---
 midterm/mid_term_spec.rb                            |  4 ++--
 .../cucumber/features/step_definitions/converter.rb | 12 ++++++------
 week7/homework/features/piratetranslator.rb         | 13 +++++++++++++
 week7/homework/questions.txt                        | 11 +++++++++++
 4 files changed, 32 insertions(+), 8 deletions(-)
 create mode 100644 week7/homework/features/piratetranslator.rb

diff --git a/midterm/mid_term_spec.rb b/midterm/mid_term_spec.rb
index 0556a97..096dfcb 100644
--- a/midterm/mid_term_spec.rb
+++ b/midterm/mid_term_spec.rb
@@ -58,7 +58,7 @@
 
    # Dinners don't always have dessert, but ThanksgivingDinners always do!
    it "should have desserts" do
-     @t_dinner.menu[:desserts].should eq({:pies => [:pumkin_pie], :other => ["Chocolate Moose"], :molds => [:cranberry, :mango, :cherry]})
+     @t_dinner.menu[:desserts].should eq({:pies => [:pumpkin_pie], :other => ["Chocolate Moose"], :molds => [:cranberry, :mango, :cherry]})
    end
 
  end
@@ -69,6 +69,6 @@
  end
 
  it "should return what is on the dessert menu" do
-   @t_dinner.whats_for_dessert.should eq "Tonight we have 5 delicious desserts: Pumkin Pie, Chocolate Moose, and 3 molds: Cranberry and Mango and Cherry."
+   @t_dinner.whats_for_dessert.should eq "Tonight we have 5 delicious desserts: Pumpkin Pie, Chocolate Moose, and 3 molds: Cranberry and Mango and Cherry."
  end
 end
diff --git a/week7/class_materials/cucumber/features/step_definitions/converter.rb b/week7/class_materials/cucumber/features/step_definitions/converter.rb
index e37c629..bc824cf 100644
--- a/week7/class_materials/cucumber/features/step_definitions/converter.rb
+++ b/week7/class_materials/cucumber/features/step_definitions/converter.rb
@@ -4,15 +4,15 @@ def initialize(unit)
 		@unit = unit.to_f
 	end
 
-	def type=(type)
-		@type = type
+	def type=(scale)
+		@scale = scale
 	end
 
 	def convert
-		self.send("#{@type}_convertion")
+		self.send("#{@scale}_conversion")
 	end
 
-	def Celsius_convertion
-	    (@unit *  (9.0/5.0) + 32.0).round(1)	
+	def Celsius_conversion
+		@unit * 9/5 + 32
 	end
-end
+end
\ No newline at end of file
diff --git a/week7/homework/features/piratetranslator.rb b/week7/homework/features/piratetranslator.rb
new file mode 100644
index 0000000..0bf7f69
--- /dev/null
+++ b/week7/homework/features/piratetranslator.rb
@@ -0,0 +1,13 @@
+class PirateTranslator
+
+
+	@@pirate_words =  {"Hello Friend" =>"Ahoy Matey\n Shiber Me Timbers You Scurvey Dogs!!"}
+
+	def say(p_string)
+		@p_string = p_string
+	end
+
+	def translate
+		@@pirate_words[@p_string]
+	end
+end
\ No newline at end of file
diff --git a/week7/homework/questions.txt b/week7/homework/questions.txt
index d55387d..9cc0152 100644
--- a/week7/homework/questions.txt
+++ b/week7/homework/questions.txt
@@ -3,7 +3,18 @@ Please Read Chapters 23 and 24 DuckTyping and MetaProgramming
 
 Questions:
 1. What is method_missing and how can it be used?
+
+Method_missing is an error handler that allows for a more graceful way to handle a no method error.
 2. What is and Eigenclass and what is it used for? Where Do Singleton methods live?
+
+Eigenclass is this weird invisible class that Singleton methods live in.
 3. When would you use DuckTypeing? How would you use it to improve your code?
+
+Ducktyping helps to reduce the amount of code that you have to maintain when using code on large collections of objects. 
 4. What is the difference between a class method and an instance method? What is the difference between instance_eval and class_eval?
+
+Class and instance methods can only be called on classes and instances, respectively. The evals are used to define those methods for their respective classes.
 5. What is the difference between a singleton class and a singleton method?
+
+The singleton class is the eigenclass created when a singleton method is created. The singleton method is a method particular to a specific object.
+

From c907da1991afee45f0597debc94f923c7b6010c1 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Mon, 9 Dec 2013 19:54:47 -0800
Subject: [PATCH 10/13] initial ttt commit

---
 week7/homework/features/symbols.rb     |   4 +
 week7/homework/features/tic-tac-toe.rb | 137 +++++++++++++++++++++++++
 2 files changed, 141 insertions(+)
 create mode 100644 week7/homework/features/symbols.rb
 create mode 100644 week7/homework/features/tic-tac-toe.rb

diff --git a/week7/homework/features/symbols.rb b/week7/homework/features/symbols.rb
new file mode 100644
index 0000000..4d84be2
--- /dev/null
+++ b/week7/homework/features/symbols.rb
@@ -0,0 +1,4 @@
+module Symbols
+	def initialize
+	end
+end
\ No newline at end of file
diff --git a/week7/homework/features/tic-tac-toe.rb b/week7/homework/features/tic-tac-toe.rb
new file mode 100644
index 0000000..52c84e9
--- /dev/null
+++ b/week7/homework/features/tic-tac-toe.rb
@@ -0,0 +1,137 @@
+class TicTacToe
+
+	attr_accessor :board
+	attr_accessor :player_symbol
+	attr_accessor :player_move
+
+
+	SYMBOLS = :X, :O
+
+	def initialize(first_player=nil, player_symbol=nil)
+		@player_symbol = player_symbol
+		@first_player = first_player
+		@board = {
+		 "a1"=>" ","a2"=>" ","a3"=>" ",
+		 "b1"=>" ","b2"=>" ","b3"=>" ",
+		 "c1"=>" ","c2"=>" ","c3"=>" "
+		}
+	end
+
+	def player=(name)
+		@name = name
+	end
+
+	def welcome_player
+		"Welcome #{@name}"
+	end
+
+	def current_player 
+		if @name.nil?
+			@user = "Computer"
+		else
+			@user = @name
+		end
+	end
+
+	def player
+		@name
+	end
+
+	def player_symbol
+		@player_symbol = :X
+	end
+
+	def computer_symbol
+		if @first_player = "Computer" && @player_symbol = :X
+			@computer_symbol = :X
+		else
+			@computer_symbol = :O
+		end
+	end
+
+	def indicate_palyer_turn
+		puts "#{@name}'s Move:"
+	end
+
+	def computer_move
+	  @move = open_spots.sample
+	  @board[@move] = computer_symbol.to_s
+	  @move
+	end
+
+	def current_state
+		@board.values
+	end
+
+	def open_spots
+		@board.each { |k, v| v.nil? }
+		@board.keys
+	end
+
+	def get_player_move
+		@player_move
+	end
+
+	def player_move(board_space = nil)
+    	if board_space.nil?
+    		@move = gets.chomp
+    	else
+    		@move = board_space
+    	end
+    	@board[@move] = player_symbol.to_s
+    	@move
+	end
+
+	def invalid_move
+		player_move
+	end
+
+	def player_won?
+		winning_columns
+		game_over = nil
+		@winning_columns.each do |column|
+			if times_in_column(column, @user) == 3
+				game_over = true
+			end
+		end
+	end
+
+	def times_in_column array, item
+  		times = 0
+  		array.each do |i|
+    		times += 1 if @board[i] == item
+			unless @board[i] == item || @board[i] == " "
+			return 0
+			end
+		end
+		times
+	end
+
+	def winning_columns
+		@winning_columns = [
+			['a1','a2','a3'],
+			['b1','b2','b3'],
+			['c1','c2','c3'],
+			['a1','b1','c1'],
+			['a2','b2','c2'],
+			['a3','b3','c3'],
+			['a1','b2','c3'],
+			['c1','b2','a3']
+		]
+	end
+
+
+	def spots_open?
+	end
+
+	def over?
+		true
+	end
+
+	def draw?
+		true
+	end
+
+	def determine_winner
+	end
+end
\ No newline at end of file

From 3c3b00571bfe0370ae13f580b973ca0044ea1ad2 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Tue, 10 Dec 2013 17:33:46 -0800
Subject: [PATCH 11/13] Add MagicNineBall gem (not working) and updates TTT
 game (also not working

---
 .../MagicNineBall/Bin/magic_nine_ball.rb      |  26 ++++++++++++++++++
 .../MagicNineBall/Lib/magicnineball.rb        |  24 ++++++++++++++++
 .../MagicNineBall/magic_nine_ball-0.0.0.gem   | Bin 0 -> 3072 bytes
 .../MagicNineBall/magic_nine_ball-0.0.1.gem   | Bin 0 -> 3072 bytes
 .../MagicNineBall/magic_nine_ball-0.0.3.gem   | Bin 0 -> 3072 bytes
 .../MagicNineBall/magic_nine_ball.gemspec     |  13 +++++++++
 .../MagicNineBall/magic_nine_ball_spec.rb     |   9 ++++++
 week7/homework/features/tic-tac-toe.rb        |  13 ++++-----
 8 files changed, 78 insertions(+), 7 deletions(-)
 create mode 100644 week7/homework/features/MagicNineBall/Bin/magic_nine_ball.rb
 create mode 100644 week7/homework/features/MagicNineBall/Lib/magicnineball.rb
 create mode 100644 week7/homework/features/MagicNineBall/magic_nine_ball-0.0.0.gem
 create mode 100644 week7/homework/features/MagicNineBall/magic_nine_ball-0.0.1.gem
 create mode 100644 week7/homework/features/MagicNineBall/magic_nine_ball-0.0.3.gem
 create mode 100644 week7/homework/features/MagicNineBall/magic_nine_ball.gemspec
 create mode 100644 week7/homework/features/MagicNineBall/magic_nine_ball_spec.rb

diff --git a/week7/homework/features/MagicNineBall/Bin/magic_nine_ball.rb b/week7/homework/features/MagicNineBall/Bin/magic_nine_ball.rb
new file mode 100644
index 0000000..8360d76
--- /dev/null
+++ b/week7/homework/features/MagicNineBall/Bin/magic_nine_ball.rb
@@ -0,0 +1,26 @@
+#!/usr/bin/env ruby
+
+require 'magic_nine_ball'
+
+class MagicNineBall
+
+	print "What is your question "
+	question = gets.chomp
+	array = ["Yes, in due time.",
+	"My sources say no.",
+	"Definitely not.",
+	"Yes.",
+	"You will have to wait.",
+	"I have my doubts.",
+	"Outlook so so.",
+	"Looks good to me!",
+	"Who knows?",
+	"Looking good!", 
+	"Probably.",
+	"Are you kidding?",
+	"Go for it!",
+	"Don't bet on it.", 
+	"Forget about it."]
+	@array = array
+	puts @array.sample
+end
\ No newline at end of file
diff --git a/week7/homework/features/MagicNineBall/Lib/magicnineball.rb b/week7/homework/features/MagicNineBall/Lib/magicnineball.rb
new file mode 100644
index 0000000..5c72cfc
--- /dev/null
+++ b/week7/homework/features/MagicNineBall/Lib/magicnineball.rb
@@ -0,0 +1,24 @@
+#!/usr/bin/env ruby
+
+class MagicNineBall
+
+	print "What is your question "
+	question = gets.chomp
+	array = ["Yes, in due time.",
+	"My sources say no.",
+	"Definitely not.",
+	"Yes.",
+	"You will have to wait.",
+	"I have my doubts.",
+	"Outlook so so.",
+	"Looks good to me!",
+	"Who knows?",
+	"Looking good!", 
+	"Probably.",
+	"Are you kidding?",
+	"Go for it!",
+	"Don't bet on it.", 
+	"Forget about it."]
+	@array = array
+	puts @array.sample
+end
\ No newline at end of file
diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.0.gem b/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.0.gem
new file mode 100644
index 0000000000000000000000000000000000000000..8ff8af7b370908111eb9f8c768eaa9d62c3b0187
GIT binary patch
literal 3072
zcmYdEEJ@TWNi5P!uVSDTFaQEG6B7my4Fu@4fvLG6ObjA#Xl!g`#Gqh6D+eK)TUreC
zJ<$5{jMUT|WC=7jA$hRZkUWQ`eXw%nyEzyptY03)!2D*CuQ#)yK-=EDx}!Vf_IQ-D
z-k$xVQKKm|-}Q*|CE48zZ~B~VPyN4l^X#Yq7k$>iUz-e0PBzcq<lGZ>G~(QsFJaL(
z(~t4Yxpi}c*R>ZfR;*uheydFHwd_uLzSBiJn4d1w|1@<G|D}%~PfJ~_dHg%`@8|P>
z1>e3EySUpaGkQTSt9YpPkt-hWA0FN;pcHM9%lu?=6x#*4s4l)ZrC$q9I_Yit`a>d3
z;!i?U@MeLTC4Sq^$bDx2!oEN^L{RYs8~e}36Q2sX=Ph3L;^5|sL5IYDtXa#KVI?B;
zxZ!GplFnAcfYagUlp?(Leu`1Qwk04iBysCQJvL{P=aYYUzi4|dm*x^Ge&Io$zq;wc
zJC`oaU*mi0T$QwR!^OSIs#7zAPt82MPT1gj=+R?aUUxm1Df422k^YHy>;V!DvoGJ@
ze0rzK@m!{r8g29JI^TTR8(I5w+VKa92OFoKJ+#0f`tP^dH?vl+{nvgEm;(O)XJ+`j
zZryDLjzN<ga#KqZQ$S_F0Oo&lQ)Be}Z(?9Jn*ZsMND%q|Ot5eNWdnh|zr%g}ZB>2C
zEfu^Kj->iGu!yn?Y?4WzRnhtOO-0kT|MLnjm5Dcg>yg!zJAZw)`Qufq5}b>xZ!P^M
zC;Qr(C#rttg`bPdr`2|8-D;3(db`*7qPxjjS@*Bpn%!al5C46=Du^L`@v>>U;=+m#
zJIuUYOnayGcQ&;NIo+Ju?h?70i_e+M?C|nCYF(}qIpov)kFNf@@$(YLf2R~T7B+vK
z^yoML)kv}K*=hCBZ@*vN*SPHB>2UMutoK9Og^%$q{yZbx{7m1UBixq`XF7cl^vhJM
zm|-|Q`vHsXrz*_}m3=z`CDzEB8Z2dfzI)$^t=^6gm3Pg|wVr4EKsi~*C&qPC+pZ^P
zF2?6vn=E4gtL*#24Sxeq)al1uzoMncqJG=ElKJzJ*Si9)C7&o=R2R;-d#m${-;LMB
zdhdB&EB>LGYG#)v*2_8LvyhLj!lj_!S><ZCe5SQ?&pDl%?iKdg>9zg(Hb!Od?a5t}
z9%mfyQMx$UkBK>Cllg|)-)Y)Tg7LGKY+6^j{p>e?kEQ?qb6u0leHc6^HK{6b$|WJD
zEB7aS|N8pZv#F={O&7m5dwzw`=0ATV?QY&%Wz(ME>BHB2-e|_cJ*&@IpF6;OsPNg$
jfQ@I~ZT|U-7gFMMt2eB8%}kHPG-}6a2#kinkO~0+*V^N6

literal 0
HcmV?d00001

diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.1.gem b/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.1.gem
new file mode 100644
index 0000000000000000000000000000000000000000..13ee9bb03c95d53d5afc7dd371e1696a4fef1a8b
GIT binary patch
literal 3072
zcmYdEEJ@TWNi5P!uVSDTFaQEG6B7my4Fu@4fvLG6ObjA#Xl!g`#Gqh6D+eK)TUreC
zJ<$5{jMUT|WC=7jA$hRZkUWQ`eXw%nyEzyxZCM_~!2D*CuQ#)yK-=EDx}!Vf_IQ-D
z-k$xVQKKm|-}Q*|CE48zZ~B~VPyN4l^X#Yq7k$>iUz-e0PBzcq<lGZ>G~(QsFJaL(
z(~t4Yxpi}c*R>ZfR;*uheydFHwd_uLzSBiJn4d1w|1@<G|D}%~PfJ~_dHg%`@8|P>
z1>e3EySUpaGkQTSt9YpPkt-hWA0FN;pcHM9%lu?=6x#*4s4l)ZrC$q9I_Yit`a>d3
z;!i?U@MeLTC4Sq^$bDx2!oEN^L{RYs8~e}36Q2sX=Ph3L;^5|sL5IYDtXa#KVI?B;
zxZ!GplFnAcfYagUlp?(Leu`1Qwk04iBysCQJvL{P=aYYUzi4|dm*x^Ge&Io$zq;wc
zJC`oaU*mi0T$QwR!^OSIs#7zAPt82MPT1gj=+R?aUUxm1Df422k^YHy>;V!DvoGJ@
ze0rzK@m!{r8g29JI^TTR8(I5w+VKa92OFoKJ+#0f`tP^dH?vl+{nvgEm;(O)XJ+`j
zZryDLjzN<ga#KqZQ$S_F0Oo&lQ+U|`%l{?@=A-$a9*G2z|IY+__g^vK+4nrW!ms#M
z_H^b|EKV`sSUe0KF*pUzs=B4)d#N;L%jfrnw`SgSU0{1TEGwtJuC}aeQG=}R-IZN;
zZKLwuU)cV3y5w4GtLz&`7c_mm(PZAd*=k3_F5}Bf>J(KsZu?*Gf7eWr1EL|*OK)~0
zsj1AlpwhYG*~t%vlkyeY1JWKE24#gZwi{MWeh~ahsWqpgg};08o2xr7SZ6u@JEgR7
z+v37WkACxCl@>eVd-sl*Z?K8!mD1gHskN04X1^*tb|HBK-{og*CnwFWT>GV9mS9Xn
za14i>m`^0HOrpcRDM3d1jOAQ=3xm0R3fF$VJK^aixAh+c-yT{v`<&#5iH0d^>y#vY
zYq$J*p*Q2L%31$)tL;*@*>l}|-}-uzm1@g_9Jb8-lzF#Totnb?B3LqW#ixb0)LQZ+
zDy1(zS(9ShK0i6>ty9v*jDF3v2d_lA#8lreNMH0dr((~P;=pfK=~wl8{(WZqA`!7n
zHfe&4yRoWB=e!&ti3JnN*?(`(|E84kajEaA^QQ0j-TNOI^zQ$Dt?ce?pES>HGHf>R
zD&%E+^?uUqPo<Tgy;RLl@JfI2x8c;W-QVVaBYLXXdtS~b2D?<cUw+>EYVK1O8zmX>
kI1bU%@9b``zYi^PrhQ*^<ux-sQq!m%qaiRF0z)YT0Bj88_5c6?

literal 0
HcmV?d00001

diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.3.gem b/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.3.gem
new file mode 100644
index 0000000000000000000000000000000000000000..346b768e58fab79fe692776108da306e87c60d64
GIT binary patch
literal 3072
zcmYdEEJ@TWNi5P!uVSDTFaQEG6B7my4Fu@4ftjf}ObjA#Xl!g`&Y)mGD+eK)TUreC
zJ<$5{jMUT|WC=7jA$hRZkUWQ`eXw%nyEz!lcP<ZNV15(gn=Nf9aJKZTw%YAx{e$-!
z9?$Wz=g@6k_EvXFP}7sS73|rjeRfIT?w6N6mB?}`F67SrzER=j%a@+kizliY@4luT
zRj1URzjbSHzF%LD*M=GA+rtWOgmoXS)BF5fJhZfs>FP%QPa;7bw@!b%&35sh)Au`n
z9-jZJT2W}_eegWbPRU*DA5NBd>8|BttlK5#B`WQ&=Tv$51&7Fj$4?&GC3YO)^9p_Q
zTR*YY&}TaDcInWJ_oeE0wtv!YGge?Pb?UhCXp2p-Yvo->fz_&P97-i~UTW`Ab{EX`
zKYFI~;JU+{+fsB*emU-u*fy(d7XQp_>lKzWcSL`%bUnRi+T16nueeLHM;Kn;>)5@V
zx%#rf8rl5AtM_)?$(qo~(DLii&5Y#TZ$2GMmgkHJj_o#BUv<9VxSU4XdF`^v9Bj%S
z1#QLO?B3t-p5Y+vSD3JW^`o!J8`{F0<|Q@w_%-L5i;3>~HRI=d;rrh@_mxh18U5Kh
zuHpHs|DXPR+VJnWlKkuc{0~n4`d%^LL+{&@2WdXXmOr$wl5*>j_}KrL9hh$Z|7T{H
zCVQZRfrkc(C^xkvF$Gix3}F5@H#b7h|0V{b`JV={jcFtz|DOr=&A(zGu=jWPnR(x)
z^uH}~nC7rzdY7|flPJ4DmrS~u;gK?{c?#d|8~c^r4q7#@Q0eIBug{)V#)z=yWaRmW
z=F~4pt!<8beO@@KyyV)3Zb#O~fz9T7H~SVa&c4>O_*d%`l~waK|8Hs&IZzuEd+lkQ
zjIiRv4mHk2v)m3J_lR?D3rKsW7<6e>!(oBFo*xXiPITgPIkfv`;JU2X7c!X>)^GB-
zbK{^z=Et|YU-5V!3*CELe0S`|)eF~s{WR@s>cQ}<4_g)<PLN%;m1nZ5`Nu<F3T6q!
zGz8D#e3#~PlUHV;d)!>7na>-fTkq`%WDbt0*!OyK?5!7~|J<xMXS&DKJ?|`2-8$)@
z#3nOsR>PAfS6pw)+^u-F_1%)XlHAhShISlBzDh1U!4-1ep}WjtX518s8S1g2k$2^4
zwUobx-kY=f!dK??%Pp<6ORnW@f6t%Q)hR75<h|kJj7v?+#hMBOvzAuaO-nPfiCGah
zCw8*5xjxUS<)#;t6K3`bG=H&}Ww<cni-2%KgVQ|TocsH3c1=7x{h8kS-}`P?{Wf2!
zbFkhu+co;jl%$#K<3yJ3aA^27{nNUd*toqxC%+bbsQoPLKWUm={H^vod%ZS)Z&P_{
zutO#J&1c;=bDpx;D9EJG;}ku;#D3OZduUOzwsLj4BnxIr7!?@}fzc2cX(0drjk5Wu

literal 0
HcmV?d00001

diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball.gemspec b/week7/homework/features/MagicNineBall/magic_nine_ball.gemspec
new file mode 100644
index 0000000..dd69f4d
--- /dev/null
+++ b/week7/homework/features/MagicNineBall/magic_nine_ball.gemspec
@@ -0,0 +1,13 @@
+	Gem::Specification.new do |s|
+	s.name = "magic_nine_ball"
+	s.version = "0.0.3"
+	s.date = '2013-11-10'
+	s.summary = "This gem predicts the future"
+	s.description = "Type in your question to get your fortune!"
+	s.authors = ["Thomas Osborn"]
+	s.email = 'trosborn@gmail.com'
+	s.homepage = 'http://rubygems.org/gems/magic_eight_ball'
+	s.files = ["lib/MagicNineBall.rb"]
+	s.licenses = ['MIT']
+	s.executables << 'magic_nine_ball.rb'
+end
\ No newline at end of file
diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball_spec.rb b/week7/homework/features/MagicNineBall/magic_nine_ball_spec.rb
new file mode 100644
index 0000000..2f467cb
--- /dev/null
+++ b/week7/homework/features/MagicNineBall/magic_nine_ball_spec.rb
@@ -0,0 +1,9 @@
+# magic_nine_ball_spec.rb
+require 'magicnineball'
+
+describe MagicNineBall do
+	it "makes sure magicnineball is not nil" do 
+	@magicnineball = MagicNineBall.new
+	@magicnineball.nil?
+	end
+end
\ No newline at end of file
diff --git a/week7/homework/features/tic-tac-toe.rb b/week7/homework/features/tic-tac-toe.rb
index 52c84e9..6b39a0c 100644
--- a/week7/homework/features/tic-tac-toe.rb
+++ b/week7/homework/features/tic-tac-toe.rb
@@ -3,6 +3,8 @@ class TicTacToe
 	attr_accessor :board
 	attr_accessor :player_symbol
 	attr_accessor :player_move
+	attr_accessor :player_symbol
+	attr_accessor :computer_symbol
 
 
 	SYMBOLS = :X, :O
@@ -10,6 +12,7 @@ class TicTacToe
 	def initialize(first_player=nil, player_symbol=nil)
 		@player_symbol = player_symbol
 		@first_player = first_player
+		get_player_move
 		@board = {
 		 "a1"=>" ","a2"=>" ","a3"=>" ",
 		 "b1"=>" ","b2"=>" ","b3"=>" ",
@@ -69,15 +72,11 @@ def open_spots
 	end
 
 	def get_player_move
-		@player_move
+		@player_move = :A1
 	end
 
-	def player_move(board_space = nil)
-    	if board_space.nil?
-    		@move = gets.chomp
-    	else
-    		@move = board_space
-    	end
+	def player_move
+		@move = @player_move
     	@board[@move] = player_symbol.to_s
     	@move
 	end

From 31b002053a4c8125cf23d8de6b8a56886832b44a Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Thu, 12 Dec 2013 23:09:30 -0800
Subject: [PATCH 12/13] everything but ending the game working

---
 .gem/credentials                              |   0
 .gem/lib/test_gem.rb                          |   0
 .gem/test_gem-0.0.0.gem                       | Bin 0 -> 3072 bytes
 .gem/test_gem.gemspec                         |  11 ++
 lib/test_gem.rb                               |   0
 midterm/animal.rb                             |   2 +
 midterm/dinner.rb                             |   2 +
 midterm/thanksgiving_dinner.rb                |  24 +++
 midterm/turkey.rb                             |  17 ++
 test_gem.rb                                   |   0
 test_gem_Thomas-0.0.0.gem                     | Bin 0 -> 3072 bytes
 test_gem_Thomas.gemspec                       |  11 ++
 week4/Rakefile.rb                             |  10 ++
 week5/exercises/Rakefile.rb                   |   5 +
 .../MagicNineBall/Bin/magic_nine_ball.rb      |   0
 .../MagicNineBall/Lib/magicnineball.rb        |   0
 .../MagicNineBall/magic_nine_ball-0.0.0.gem   | Bin
 .../MagicNineBall/magic_nine_ball-0.0.1.gem   | Bin
 .../MagicNineBall/magic_nine_ball-0.0.3.gem   | Bin
 .../MagicNineBall/magic_nine_ball.gemspec     |   0
 .../MagicNineBall/magic_nine_ball_spec.rb     |   0
 .../features/step_definitions/tic-tac-toe.rb  | 157 ++++++++++++++++++
 week7/homework/features/tic-tac-toe.rb        | 136 ---------------
 23 files changed, 239 insertions(+), 136 deletions(-)
 create mode 100644 .gem/credentials
 create mode 100644 .gem/lib/test_gem.rb
 create mode 100644 .gem/test_gem-0.0.0.gem
 create mode 100644 .gem/test_gem.gemspec
 create mode 100644 lib/test_gem.rb
 create mode 100644 midterm/animal.rb
 create mode 100644 midterm/dinner.rb
 create mode 100644 midterm/thanksgiving_dinner.rb
 create mode 100644 midterm/turkey.rb
 create mode 100644 test_gem.rb
 create mode 100644 test_gem_Thomas-0.0.0.gem
 create mode 100644 test_gem_Thomas.gemspec
 create mode 100644 week4/Rakefile.rb
 create mode 100644 week5/exercises/Rakefile.rb
 rename week7/{homework/features => }/MagicNineBall/Bin/magic_nine_ball.rb (100%)
 rename week7/{homework/features => }/MagicNineBall/Lib/magicnineball.rb (100%)
 rename week7/{homework/features => }/MagicNineBall/magic_nine_ball-0.0.0.gem (100%)
 rename week7/{homework/features => }/MagicNineBall/magic_nine_ball-0.0.1.gem (100%)
 rename week7/{homework/features => }/MagicNineBall/magic_nine_ball-0.0.3.gem (100%)
 rename week7/{homework/features => }/MagicNineBall/magic_nine_ball.gemspec (100%)
 rename week7/{homework/features => }/MagicNineBall/magic_nine_ball_spec.rb (100%)
 create mode 100644 week7/homework/features/step_definitions/tic-tac-toe.rb
 delete mode 100644 week7/homework/features/tic-tac-toe.rb

diff --git a/.gem/credentials b/.gem/credentials
new file mode 100644
index 0000000..e69de29
diff --git a/.gem/lib/test_gem.rb b/.gem/lib/test_gem.rb
new file mode 100644
index 0000000..e69de29
diff --git a/.gem/test_gem-0.0.0.gem b/.gem/test_gem-0.0.0.gem
new file mode 100644
index 0000000000000000000000000000000000000000..2a7cbe26264cfce9947db19c657207748595ef4c
GIT binary patch
literal 3072
zcmYdEEJ@TWNi5P!uVSDTFaQEG6B7my4Fu@4fuRXp3?gr6Y;0)6pkP2N2O*nVS`73(
z&`ISPsi`^05@>8f@?ftac@9ncVCBkpb1-cD-yOujeCnjnC4Em_y-t7svsbmfk`}NU
zFfbVl3mfpVyf9I_ec{N3BXb-NHmI$0WL|nywbRw%^=adv;NlM}lvVoQ?F=;FayzIY
z@dV`0|Nog8ES5}WW?&nvz8-ZKECg~>OA=E+WxxRDe{%y<SeXFJ|0V{;qxl~eN3^67
z`TtC?cmEXwo_){5EBuRJWlv{zVR}2yLQy56kYV8|U)$UpYMOpsW&dsctmh`O-ZJ)F
zdgSBt<LSFy0}qJm-whVsC7&{>&fo9#d1J}yEo_r{<0?y*C<gkxb@2PE)c0x4|HSX9
z!I}-mEA&!NA3k%$M9{5p=`+sDh8r$Vh}DR>Bw>*idf=~wjN1>1-3RQnnJ%9{TD0xe
zn)kZd6M`ilU701gw&lmS*sn8K3S-U9T`!BAm0pp(w=Q+B{*P5vvrc}0(z|rW%s`Wz
z=UdXM*bngqO;Bb$bl}EhrS>wRPcqkf^4fK#t68}Ar%Y?PTk^@Zzq969jhJNgyXMUP
zvg0}C3oUQ1yTu(<w7kXitOZBA;nK+P&~@D}k|Zlue0s_gKG{_0#gjt5Pg%7-7QSm2
zON6Uu^-6~&Nxus@T6WCjo#dPT+S!Y@>VNrqnXTl><Sm!j^$q(hT!lLItqOSpPV8$s
zyn8#l;HDp!W;`kFt6sr>KKRt0|Esr{<!9R-jZmwY&{Y%>+wjZ!>9U&GxcxyF`R@H%
zSi3;I@u+?MI___7M~_;jG}atopTxOmdS7$OvTN7km%T6trU+0W`)Q%A;}&LGCXZ3G
NM?+vV1cq@4008b)EU5qh

literal 0
HcmV?d00001

diff --git a/.gem/test_gem.gemspec b/.gem/test_gem.gemspec
new file mode 100644
index 0000000..d155ada
--- /dev/null
+++ b/.gem/test_gem.gemspec
@@ -0,0 +1,11 @@
+Gem::Specification.new do |s|
+s.name = 'test_gem_Thomas'
+s.version = '0.0.0'
+s.date = '2013-11-19'
+s.summary = "Make a Test Gem"
+s.description = "A gem to get a grade"
+s.authors = ["Thomas Osborn"]
+s.email = 'trosborn@gmail.com'
+s.homepage = 'http://rubygems.org/gems/test_gem'
+s.files = ["lib/test_gem.rb"]
+end
\ No newline at end of file
diff --git a/lib/test_gem.rb b/lib/test_gem.rb
new file mode 100644
index 0000000..e69de29
diff --git a/midterm/animal.rb b/midterm/animal.rb
new file mode 100644
index 0000000..ebfe41a
--- /dev/null
+++ b/midterm/animal.rb
@@ -0,0 +1,2 @@
+class Animal
+end
\ No newline at end of file
diff --git a/midterm/dinner.rb b/midterm/dinner.rb
new file mode 100644
index 0000000..918f10b
--- /dev/null
+++ b/midterm/dinner.rb
@@ -0,0 +1,2 @@
+class Dinner
+end
\ No newline at end of file
diff --git a/midterm/thanksgiving_dinner.rb b/midterm/thanksgiving_dinner.rb
new file mode 100644
index 0000000..6ac54bb
--- /dev/null
+++ b/midterm/thanksgiving_dinner.rb
@@ -0,0 +1,24 @@
+require './dinner.rb'
+
+class ThanksgivingDinner < Dinner
+
+	def initialize(diet)
+		@diet = diet
+	end
+
+	def guests=(guests) 
+		@guests = guests
+	end
+
+	def seating_chart_size
+		@guests.inject(0) {|n, i| n += i.length }
+	end
+
+	def menu
+		{ diet: @diet, proteins: ["Tofurkey", "Hummus"], veggies: [:ginger_carrots , :potatoes , :yams], desserts: ({:pies => [:pumpkin_pie], :other => ["Chocolate Moose"], :molds => [:cranberry, :mango, :cherry]}) }
+	end
+
+	def whats_for_dinner
+		@t_dinner.menu
+	end
+end
\ No newline at end of file
diff --git a/midterm/turkey.rb b/midterm/turkey.rb
new file mode 100644
index 0000000..49b347f
--- /dev/null
+++ b/midterm/turkey.rb
@@ -0,0 +1,17 @@
+require './animal.rb'
+
+class Turkey < Animal
+
+	def initialize(weight)
+	end
+
+	def weight
+		weight = 10
+	end
+
+	def gobble_speak(turkey_words)
+		turkeys_words = "Gobble Gobble Gobble gobble Gobble. Gobble Gobb'le Gobble Gobble."
+	end
+
+end
+
diff --git a/test_gem.rb b/test_gem.rb
new file mode 100644
index 0000000..e69de29
diff --git a/test_gem_Thomas-0.0.0.gem b/test_gem_Thomas-0.0.0.gem
new file mode 100644
index 0000000000000000000000000000000000000000..7f663d7d1b528a519fbcabcf3e387cfd189d4ab3
GIT binary patch
literal 3072
zcmYdEEJ@TWNi5P!uVSDTFaQEG6B7my4Fu@4fuRXp3?gr6Y;0)6pkP2N2O*nVS`73(
z&`ISPsi`^05@>8f@?ftac@9ncVCBkpb1>vF_5?97pE~JtN#9dfuhZZE>{V^Aqy?-7
z3{1wt!Unu7FHF>KUpR8%$Q;Lm4QlHgnU@|_?R0f`ecCuExcI{gWtIMSI|B{4+zx6;
zJOTOh|9@r%izSnp8Q2D^uSeYl3xV9!lEf5H88CqP-`v0qRwlsmzlnj#X#R)A5iMy%
z{y!7!oqxqZVBhcX9m{Q>UM*tqUhwS*r=sIg#+Egm#<OP}E0eHZ@%MYr+_QS3E7IS1
ze5=^^^V!T*tDcCi{TnR&OFm;#RlncL^W0L^Ti7P?##I!oNI5j)ONZZm|AUSq`zI)6
zU$sB8KSxXPspOSwdwwP=s>~5oGVV%kE8%%E<%|f^H51k@uaKh8iuT9sCY<kb_))xd
z%G#>e?A~6VG<kw9r7@k>+gB^jtl}24{jTrT($Md2+tzBu-+kv@C(5k%g8j>}q&sH}
zq&9hLO}yvn7qskv`y>VTCPr4P4aV0SoH}2Wohiy~68_PV=6m71x?YXXi{f+X6CExK
z^w`~!-F(;L?9Fdy<F3!DIvDwwN%^_K(k&~Noh(g^UBle#yKm0Jq-|}ob0wx9Sbyy}
z%jY$+$09sjK1zEfNxutm-Rm&x8^^cfj_LWoTKCo6YT&DV6!z=E&Eta4I&?0&9zPNk
zwrBm5hj(u?b4S)>`h2qbZM&uYx#H73|5tA?+ZN<+_KZ_*=OPiVR+0MlJ6G4gejToK
z>teM1EB2bCh(Dj@cPHe##LQ(*I>BDyFz-P1yB$wXxMcoK?W$vjl(IQREGD~w>`^cp
N0;3@?8Umz;004B>FxLP8

literal 0
HcmV?d00001

diff --git a/test_gem_Thomas.gemspec b/test_gem_Thomas.gemspec
new file mode 100644
index 0000000..d155ada
--- /dev/null
+++ b/test_gem_Thomas.gemspec
@@ -0,0 +1,11 @@
+Gem::Specification.new do |s|
+s.name = 'test_gem_Thomas'
+s.version = '0.0.0'
+s.date = '2013-11-19'
+s.summary = "Make a Test Gem"
+s.description = "A gem to get a grade"
+s.authors = ["Thomas Osborn"]
+s.email = 'trosborn@gmail.com'
+s.homepage = 'http://rubygems.org/gems/test_gem'
+s.files = ["lib/test_gem.rb"]
+end
\ No newline at end of file
diff --git a/week4/Rakefile.rb b/week4/Rakefile.rb
new file mode 100644
index 0000000..ca1554d
--- /dev/null
+++ b/week4/Rakefile.rb
@@ -0,0 +1,10 @@
+task :default => [:hello_world]
+
+desc "this outputs hello world"
+task :hello_world do
+	puts "hello world!"
+end
+
+def test
+		"tequila"
+end
\ No newline at end of file
diff --git a/week5/exercises/Rakefile.rb b/week5/exercises/Rakefile.rb
new file mode 100644
index 0000000..83391d9
--- /dev/null
+++ b/week5/exercises/Rakefile.rb
@@ -0,0 +1,5 @@
+task :outputs_name do
+	File.open("names").readlines.each do |line|
+   	puts line
+	end
+end
\ No newline at end of file
diff --git a/week7/homework/features/MagicNineBall/Bin/magic_nine_ball.rb b/week7/MagicNineBall/Bin/magic_nine_ball.rb
similarity index 100%
rename from week7/homework/features/MagicNineBall/Bin/magic_nine_ball.rb
rename to week7/MagicNineBall/Bin/magic_nine_ball.rb
diff --git a/week7/homework/features/MagicNineBall/Lib/magicnineball.rb b/week7/MagicNineBall/Lib/magicnineball.rb
similarity index 100%
rename from week7/homework/features/MagicNineBall/Lib/magicnineball.rb
rename to week7/MagicNineBall/Lib/magicnineball.rb
diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.0.gem b/week7/MagicNineBall/magic_nine_ball-0.0.0.gem
similarity index 100%
rename from week7/homework/features/MagicNineBall/magic_nine_ball-0.0.0.gem
rename to week7/MagicNineBall/magic_nine_ball-0.0.0.gem
diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.1.gem b/week7/MagicNineBall/magic_nine_ball-0.0.1.gem
similarity index 100%
rename from week7/homework/features/MagicNineBall/magic_nine_ball-0.0.1.gem
rename to week7/MagicNineBall/magic_nine_ball-0.0.1.gem
diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball-0.0.3.gem b/week7/MagicNineBall/magic_nine_ball-0.0.3.gem
similarity index 100%
rename from week7/homework/features/MagicNineBall/magic_nine_ball-0.0.3.gem
rename to week7/MagicNineBall/magic_nine_ball-0.0.3.gem
diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball.gemspec b/week7/MagicNineBall/magic_nine_ball.gemspec
similarity index 100%
rename from week7/homework/features/MagicNineBall/magic_nine_ball.gemspec
rename to week7/MagicNineBall/magic_nine_ball.gemspec
diff --git a/week7/homework/features/MagicNineBall/magic_nine_ball_spec.rb b/week7/MagicNineBall/magic_nine_ball_spec.rb
similarity index 100%
rename from week7/homework/features/MagicNineBall/magic_nine_ball_spec.rb
rename to week7/MagicNineBall/magic_nine_ball_spec.rb
diff --git a/week7/homework/features/step_definitions/tic-tac-toe.rb b/week7/homework/features/step_definitions/tic-tac-toe.rb
new file mode 100644
index 0000000..007c959
--- /dev/null
+++ b/week7/homework/features/step_definitions/tic-tac-toe.rb
@@ -0,0 +1,157 @@
+class TicTacToe
+
+	attr_accessor :board
+	attr_accessor :player_move
+	attr_accessor :player_symbol
+	attr_accessor :computer_symbol
+	attr_accessor :player
+	attr_accessor :current_player
+	attr_accessor :player_won
+	attr_accessor :computer_won
+
+	SYMBOLS = [:X, :O]
+
+	def initialize(current_player = :computer, player_symbol= :X, player = "")
+		@player_symbol = player_symbol
+		@current_player = current_player
+		@player = player
+		winning_columns
+		@board = {
+		 "a1"=>" ","a2"=>" ","a3"=>" ",
+		 "b1"=>" ","b2"=>" ","b3"=>" ",
+		 "c1"=>" ","c2"=>" ","c3"=>" "
+		}
+	end
+
+	def welcome_player
+		"Welcome #{@player}"
+	end
+
+	def current_player 
+		if (@current_player == :computer)
+			return "Computer"
+		else
+		@player
+		end
+	end
+
+	def computer_symbol
+		if (@player_symbol == :O)
+			@player_symbol = :X
+		else
+			@computer_symbol = :O
+		end
+	end
+
+	def indicate_palyer_turn
+		puts "#{@player}'s Move:"
+	end
+
+	def computer_move
+		computer_symbol
+		move = open_spots.sample
+		@board[move] = @computer_symbol
+		move
+		@current_player = player
+	end
+
+	def current_state
+		@board.values
+	end
+
+	def open_spots
+		spots = []
+		@board.each{|k, v| spots << k if v == " " }
+		spots
+	end
+
+	def get_player_move
+		player_move = gets.chomp
+	end
+
+
+	def player_move
+		board_square = get_player_move
+		if @board[board_square] != " "
+			player_move
+		else
+			@board[board_square] = @player_symbol
+		end
+		@current_player = :computer
+	end
+
+	def computer_won?
+		check_game
+	end
+
+	def player_won?
+		check_game
+	end
+
+  
+	def check_game
+	game_over = nil
+	@winning_columns.each do |column|
+		if times_in_column(column, @computer) == 3
+			@computer_won = true
+		end
+		if times_in_column(column, @player) == 3
+			@player_won = true
+		end
+	end
+	end
+
+	def times_in_column arr, item
+	times = 0
+	arr.each do |i| 
+	times += 1 if @board[i] == item
+		unless @board[i] == item || @board[i] == " "
+			return 0
+			end
+		end
+	times
+	end
+
+	def winning_columns
+	@winning_columns = [
+		[:a1,:a2,:a3],
+		[:b1,:b2,:b3],
+		[:c1,:c2,:c3],
+
+		[:a1,:b1,:c1],
+		[:a2,:b2,:c2],
+		[:a3,:b3,:c3],
+
+		[:a1,:b2,:c3],
+		[:c1,:b2,:a3]
+	]
+	end
+
+
+	def spots_open?
+		@board.has_value?(' ')
+	end
+
+	def over?
+		if @player_won == true
+			return true
+		elsif @computer_won == true
+			return true
+		end
+	end
+
+	def draw?
+	draw = false
+		if over? && player_won? == false && computer_won? == false
+		draw = true
+		end
+	draw
+	end
+
+	def current_state
+		"#{@board}"
+	end
+
+	def determine_winner
+	end
+end
\ No newline at end of file
diff --git a/week7/homework/features/tic-tac-toe.rb b/week7/homework/features/tic-tac-toe.rb
deleted file mode 100644
index 6b39a0c..0000000
--- a/week7/homework/features/tic-tac-toe.rb
+++ /dev/null
@@ -1,136 +0,0 @@
-class TicTacToe
-
-	attr_accessor :board
-	attr_accessor :player_symbol
-	attr_accessor :player_move
-	attr_accessor :player_symbol
-	attr_accessor :computer_symbol
-
-
-	SYMBOLS = :X, :O
-
-	def initialize(first_player=nil, player_symbol=nil)
-		@player_symbol = player_symbol
-		@first_player = first_player
-		get_player_move
-		@board = {
-		 "a1"=>" ","a2"=>" ","a3"=>" ",
-		 "b1"=>" ","b2"=>" ","b3"=>" ",
-		 "c1"=>" ","c2"=>" ","c3"=>" "
-		}
-	end
-
-	def player=(name)
-		@name = name
-	end
-
-	def welcome_player
-		"Welcome #{@name}"
-	end
-
-	def current_player 
-		if @name.nil?
-			@user = "Computer"
-		else
-			@user = @name
-		end
-	end
-
-	def player
-		@name
-	end
-
-	def player_symbol
-		@player_symbol = :X
-	end
-
-	def computer_symbol
-		if @first_player = "Computer" && @player_symbol = :X
-			@computer_symbol = :X
-		else
-			@computer_symbol = :O
-		end
-	end
-
-	def indicate_palyer_turn
-		puts "#{@name}'s Move:"
-	end
-
-	def computer_move
-	  @move = open_spots.sample
-	  @board[@move] = computer_symbol.to_s
-	  @move
-	end
-
-	def current_state
-		@board.values
-	end
-
-	def open_spots
-		@board.each { |k, v| v.nil? }
-		@board.keys
-	end
-
-	def get_player_move
-		@player_move = :A1
-	end
-
-	def player_move
-		@move = @player_move
-    	@board[@move] = player_symbol.to_s
-    	@move
-	end
-
-	def invalid_move
-		player_move
-	end
-
-	def player_won?
-		winning_columns
-		game_over = nil
-		@winning_columns.each do |column|
-			if times_in_column(column, @user) == 3
-				game_over = true
-			end
-		end
-	end
-
-	def times_in_column array, item
-  		times = 0
-  		array.each do |i|
-    		times += 1 if @board[i] == item
-			unless @board[i] == item || @board[i] == " "
-			return 0
-			end
-		end
-		times
-	end
-
-	def winning_columns
-		@winning_columns = [
-			['a1','a2','a3'],
-			['b1','b2','b3'],
-			['c1','c2','c3'],
-			['a1','b1','c1'],
-			['a2','b2','c2'],
-			['a3','b3','c3'],
-			['a1','b2','c3'],
-			['c1','b2','a3']
-		]
-	end
-
-
-	def spots_open?
-	end
-
-	def over?
-		true
-	end
-
-	def draw?
-		true
-	end
-
-	def determine_winner
-	end
-end
\ No newline at end of file

From a355f9a01ddfc5e311baed3de824d48b4f648b25 Mon Sep 17 00:00:00 2001
From: Thomas Osborn <trosborn@gmail.com>
Date: Fri, 13 Dec 2013 11:17:38 -0800
Subject: [PATCH 13/13] game works, but untested

---
 .../features/step_definitions/tic-tac-toe.rb  | 74 +++++++------------
 1 file changed, 26 insertions(+), 48 deletions(-)

diff --git a/week7/homework/features/step_definitions/tic-tac-toe.rb b/week7/homework/features/step_definitions/tic-tac-toe.rb
index 007c959..3036816 100644
--- a/week7/homework/features/step_definitions/tic-tac-toe.rb
+++ b/week7/homework/features/step_definitions/tic-tac-toe.rb
@@ -15,7 +15,6 @@ def initialize(current_player = :computer, player_symbol= :X, player = "")
 		@player_symbol = player_symbol
 		@current_player = current_player
 		@player = player
-		winning_columns
 		@board = {
 		 "a1"=>" ","a2"=>" ","a3"=>" ",
 		 "b1"=>" ","b2"=>" ","b3"=>" ",
@@ -81,63 +80,37 @@ def player_move
 	end
 
 	def computer_won?
-		check_game
+		@computer_won
 	end
 
 	def player_won?
-		check_game
+		@player_won
 	end
 
-  
-	def check_game
-	game_over = nil
-	@winning_columns.each do |column|
-		if times_in_column(column, @computer) == 3
-			@computer_won = true
-		end
-		if times_in_column(column, @player) == 3
-			@player_won = true
-		end
-	end
-	end
-
-	def times_in_column arr, item
-	times = 0
-	arr.each do |i| 
-	times += 1 if @board[i] == item
-		unless @board[i] == item || @board[i] == " "
-			return 0
-			end
-		end
-	times
-	end
-
-	def winning_columns
-	@winning_columns = [
-		[:a1,:a2,:a3],
-		[:b1,:b2,:b3],
-		[:c1,:c2,:c3],
-
-		[:a1,:b1,:c1],
-		[:a2,:b2,:c2],
-		[:a3,:b3,:c3],
-
-		[:a1,:b2,:c3],
-		[:c1,:b2,:a3]
-	]
-	end
-
-
 	def spots_open?
 		@board.has_value?(' ')
 	end
 
 	def over?
-		if @player_won == true
-			return true
-		elsif @computer_won == true
-			return true
+		if (@board["a1"]==@board["a2"] && @board["a2"]==@board["a3"] && @board["a1"]==:X ) || (@board["b1"]==@board["b2"] && @board["b2"]==@board["b3"] && @board["b1"]==:X ) || (@board["c1"]==@board["c2"] && @board["c2"]==@board["c3"] && @board["c1"]==:X ) || (@board["a1"]==@board["b1"] && @board["b1"]==@board["c1"] && @board["a1"]==:X ) || (@board["a2"]==@board["b2"] && @board["a2"]==@board["c2"] && @board["a2"]==:X ) || (@board["a3"]==@board["b3"] && @board["a3"]==@board["c3"] && @board["a3"]==:X ) || (@board["a1"]==@board["b2"] && @board["a1"]==@board["c3"] && @board["a1"]==:X ) || (@board["a3"]==@board["b2"] && @board["a3"]==@board["c1"] && @board["a3"]==:X )
+			if @player_symbol == :X
+			  @player_won = true
+			elsif @computer_symbol == :X
+			  @computer_won = true
+			end
+			@over = true
+			elsif (@board["a1"]==@board["a2"] && @board["a2"]==@board["a3"] && @board["a1"]==:O ) || (@board["b1"]==@board["b2"] && @board["b2"]==@board["b3"] && @board["b1"]==:O ) || (@board["c1"]==@board["c2"] && @board["c2"]==@board["c3"] && @board["c1"]==:O ) || (@board["a1"]==@board["b1"] && @board["b1"]==@board["c1"] && @board["a1"]==:O ) || (@board["a2"]==@board["b2"] && @board["a2"]==@board["c2"] && @board["a2"]==:O ) || (@board["a3"]==@board["b3"] && @board["a3"]==@board["c3"] && @board["a3"]==:O ) || (@board["a1"]==@board["b2"] && @board["a1"]==@board["c3"] && @board["a1"]==:O ) || (@board["a3"]==@board["b2"] && @board["a3"]==@board["c1"] && @board["a3"]==:O )
+			if @player_symbol == :O
+			  @player_won = true
+			elsif @computer_symbol == :O
+			  @computer_won = true
+			end
+			@over = true
+			elsif @board.empty?
+			@draw = true
+			@over = true
 		end
+		@over
 	end
 
 	def draw?
@@ -149,9 +122,14 @@ def draw?
 	end
 
 	def current_state
-		"#{@board}"
+		<<-board
+		"#{@board["a1"]}""#{@board["a2"]}""#{@board["a3"]}"
+		"#{@board["b1"]}""#{@board["b2"]}""#{@board["b3"]}"
+		"#{@board["c1"]}""#{@board["c2"]}""#{@board["c3"]}"
+		board
 	end
 
 	def determine_winner
+		over?
 	end
 end
\ No newline at end of file