require 'sinatra' require 'sinatra/cookies' require './hex_engine' def secret 'tajny_token_hehe' end get '/:command' do |command| engine = Hex.new cookies.to_h engine.step command engine.state_h.each_pair do |key, value| cookies[key] = value end engine.message end