Решение на Шеста задача от Веселин Стоянов
Обратно към всички решения
Към профила на Веселин Стоянов
Резултати
- 0 точки от тестове
- 0 бонус точки
- 0 точки общо
- 0 успешни тест(а)
- 14 неуспешни тест(а)
Код
Лог от изпълнението
FFFFFFFFFFFFFF
Failures:
1) TurtleGraphics renders a complex shape
Failure/Error: canvas = TurtleGraphics::Turtle.new(20, 20).draw do
NoMethodError:
undefined method `each' for 20:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:265:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:265:in `block (2 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
2) TurtleGraphics Turtle #draw #move marks where the turtle has moved
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:10:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
3) TurtleGraphics Turtle #draw #move moves the turtle to the start of row or column when we are at its end
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:15:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
4) TurtleGraphics Turtle #draw #move keeps the orientation when we get out of column
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:34:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
5) TurtleGraphics Turtle #draw #move counts the times we have passed through every cell
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:46:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
6) TurtleGraphics Turtle #draw #turn_right turns the orienation of the turtle right of where we stand
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:56:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
7) TurtleGraphics Turtle #draw #turn_left turns the orienation of the turtle left of where we stand
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:74:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
8) TurtleGraphics Turtle #draw #spawn_at moves the turtle to an exact location in the start
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:92:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
9) TurtleGraphics Turtle #draw #look turns the turtle based on where it should look
Failure/Error: TurtleGraphics::Turtle.new(2, 2).draw(&block)
NoMethodError:
undefined method `each' for 2:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:4:in `create_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:99:in `block (5 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
10) TurtleGraphics Canvas::ASCII renders the proper symbols depending on the intensity
Failure/Error: ascii = TurtleGraphics::Turtle.new(3, 3).draw(ascii_canvas) do
NoMethodError:
undefined method `each' for 3:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:114:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:114:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
11) TurtleGraphics Canvas::ASCII can render with a different number of symbols
Failure/Error: ascii = TurtleGraphics::Turtle.new(3, 3).draw(ascii_canvas) do
NoMethodError:
undefined method `each' for 3:Fixnum
# /tmp/d20151203-5272-idu777/solution.rb:10:in `initialize'
# /tmp/d20151203-5272-idu777/spec.rb:137:in `new'
# /tmp/d20151203-5272-idu777/spec.rb:137:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
12) TurtleGraphics Canvas::HTML renders the proper template
Failure/Error: html_canvas = TurtleGraphics::Canvas::HTML.new(pixel_size)
NameError:
uninitialized constant TurtleGraphics::Canvas::HTML
# /tmp/d20151203-5272-idu777/spec.rb:161:in `create_html_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:166:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
13) TurtleGraphics Canvas::HTML sets the pixel size of the table
Failure/Error: html_canvas = TurtleGraphics::Canvas::HTML.new(pixel_size)
NameError:
uninitialized constant TurtleGraphics::Canvas::HTML
# /tmp/d20151203-5272-idu777/spec.rb:161:in `create_html_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:219:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
14) TurtleGraphics Canvas::HTML changes the opacity of a cell based on the times we have passed
Failure/Error: html_canvas = TurtleGraphics::Canvas::HTML.new(pixel_size)
NameError:
uninitialized constant TurtleGraphics::Canvas::HTML
# /tmp/d20151203-5272-idu777/spec.rb:161:in `create_html_canvas'
# /tmp/d20151203-5272-idu777/spec.rb:228:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (3 levels) in <top (required)>'
# ./lib/language/ruby/run_with_timeout.rb:5:in `block (2 levels) in <top (required)>'
Finished in 0.00655 seconds
14 examples, 14 failures
Failed examples:
rspec /tmp/d20151203-5272-idu777/spec.rb:264 # TurtleGraphics renders a complex shape
rspec /tmp/d20151203-5272-idu777/spec.rb:9 # TurtleGraphics Turtle #draw #move marks where the turtle has moved
rspec /tmp/d20151203-5272-idu777/spec.rb:14 # TurtleGraphics Turtle #draw #move moves the turtle to the start of row or column when we are at its end
rspec /tmp/d20151203-5272-idu777/spec.rb:33 # TurtleGraphics Turtle #draw #move keeps the orientation when we get out of column
rspec /tmp/d20151203-5272-idu777/spec.rb:45 # TurtleGraphics Turtle #draw #move counts the times we have passed through every cell
rspec /tmp/d20151203-5272-idu777/spec.rb:55 # TurtleGraphics Turtle #draw #turn_right turns the orienation of the turtle right of where we stand
rspec /tmp/d20151203-5272-idu777/spec.rb:73 # TurtleGraphics Turtle #draw #turn_left turns the orienation of the turtle left of where we stand
rspec /tmp/d20151203-5272-idu777/spec.rb:91 # TurtleGraphics Turtle #draw #spawn_at moves the turtle to an exact location in the start
rspec /tmp/d20151203-5272-idu777/spec.rb:98 # TurtleGraphics Turtle #draw #look turns the turtle based on where it should look
rspec /tmp/d20151203-5272-idu777/spec.rb:112 # TurtleGraphics Canvas::ASCII renders the proper symbols depending on the intensity
rspec /tmp/d20151203-5272-idu777/spec.rb:135 # TurtleGraphics Canvas::ASCII can render with a different number of symbols
rspec /tmp/d20151203-5272-idu777/spec.rb:165 # TurtleGraphics Canvas::HTML renders the proper template
rspec /tmp/d20151203-5272-idu777/spec.rb:218 # TurtleGraphics Canvas::HTML sets the pixel size of the table
rspec /tmp/d20151203-5272-idu777/spec.rb:227 # TurtleGraphics Canvas::HTML changes the opacity of a cell based on the times we have passed
История (1 версия и 0 коментара)
Веселин обнови решението на 02.12.2015 15:08 (преди около 9 години)