harbor run -t openthoughts/tasktrove-exp-rpt-stack-ruby-v2-stack-ruby-8510harbor download openthoughts/tasktrove-exp-rpt-stack-ruby-v2-stack-ruby-8510Implement Ruby sources under /app/ so that the test file at /tests/test_solution.rb requires and runs cleanly under rspec (or plain ruby if the file uses Test::Unit / minitest).
tests/test_solution.rb)Below is a deterministic summary of what the test file expects. Use this as the source of truth for require-paths and public API. If the original task description below conflicts with this section, prefer this section.
Language: Ruby
Test framework hint: RSpec / minitest (test.sh runs rspec if RSpec/describe is detected, otherwise plain ruby)
Symbols the test references that you likely need to define (class/module names not from Ruby/RSpec/Rails stdlib; place under /app/):
Dictionary — constructed via Dictionary.new(...) with arities: 1 argWord — constructed via Word.new(...) with arities: 2 argsMethods invoked on instances/objects (you must expose at least these with the indicated arity; return type is inferred from how the test uses the result):
.legal?(...) — called with: 1 arg.play_letter(...) — called with: 3 argsruby:3.2-slim with build-essential, ruby-dev, libffi-dev for native extensions.rspec, minitest. Other 3rd-party gems (see list above) are best-effort gem install-ed by tests/test.sh before running the test.tests/test.sh) runs bundle install if /app/Gemfile exists, then auto-requires every *.rb file under /app/ (recursively) via $LOAD_PATH.unshift('/app'). So you can place sources at any depth under /app/ as long as relative-require paths resolve.require 'foo/bar' in the test, ensure either the foo gem provides it OR you create /app/foo/bar.rb with the required constants.Task: Implement a minimal Upwords game core in /app that supports placing stacked letters on a board, building Word objects from board coordinates, scoring with a simple top-row bonus, and dictionary validation.
Requirements
Create an Upwords module (module Upwords; end) to satisfy test inclusion, but do not namespace the core classes under it (tests expect top-level Board, Dictionary, and Word).
Implement a Board class (app/board.rb) with:
Implement a Dictionary class (app/dictionary.rb) with:
Implement a Word class (app/word.rb) with:
The test setup in the provided code will:
File layout under /app/:
Acceptance criteria (what the implementation must enable)
Notes