Commit 9262e90

mo k <mo@mokhan.ca>
2012-08-10 03:52:39
hack out console app as a start.
1 parent 0686757
Changed files (1)
bin/app.rb
@@ -0,0 +1,34 @@
+#!/usr/bin/ruby
+require 'terrain'
+
+def get_heading(pneumonic)
+  case(pneumonic)
+  when 'N'
+    North.new
+  when 'E'
+    East.new
+  when 'W'
+    West.new
+  when 'S'
+    South.new
+  end
+end
+
+puts "enter size of terrain:"
+terrain = gets
+
+puts "enter landing coordinates:"
+landing = gets
+
+puts "enter instructions:"
+instructions = gets
+
+coordinates = terrain.split(" ")
+terrain = Terrain.new({:x => coordinates[0], :y => coordinates[1]})
+
+heading = get_heading( landing.split(" ")[2])
+location = {:x => landing.split(" ")[0], :y => landing.split(" ")[1]}
+
+instructions.each do |instruction|
+
+end