module PaintSamplesRealS56
PaintSamples — real formatter output for S5–S6 plugins.
Constants
- BOGGLE_GRID
Public Instance Methods
Source
# File lib/paint_samples/register_real_s5_s6.rb, line 32 def register_all PaintSamples.register("poker") do table = { stage: :flop, pot: 150, community: [ { rank: "9", suit: "S" }, { rank: "J", suit: "D" }, { rank: "4", suit: "H" } ], players: { "alice" => { hole: [{ rank: "A", suit: "S" }, { rank: "K", suit: "H" }], street_bet: 50, folded: false }, "bob" => { hole: [{ rank: "Q", suit: "C" }, { rank: "Q", suit: "D" }], street_bet: 50, folded: false } } } Poker.format_table_state(table, viewer: "alice").split("\n") end PaintSamples.register("solitaire") do game = SolitairePlay::Freecell.new_game(deck: Game.build_deck, rand: ->(_max) { 0 }) game.board_text(user: "alice").split("\n") end PaintSamples.register("battleships") do start = BattleshipsGame.start_ai_game(user: "alice", rand: ->(_max) { 0 }) BattleshipsGame.format_board(start[:game], user: "alice").split("\n") end PaintSamples.register("boggle") do BoggleReport.new_round(BOGGLE_GRID, total_words: 3).split("\n") end PaintSamples.register("trivia") do round = Trivia.fallback_round(rand: ->(_max) { 0 }) ["Trivia: #{round['question']}"] end PaintSamples.register("roulette") do Roulette.format_result( user: "alice", bet_type: :red, bet_value: nil, amount: 50, number: 17, won: false, balance: 950 ).split("\n") end PaintSamples.register("pool") do games = {} Pool.new_game("alice", channel: "#paint", games: games) Pool.join_game("bob", channel: "#paint", games: games) result = Pool.start_game("alice", channel: "#paint", games: games) result[:message].split("\n") end PaintSamples.register("snakes") do items = [{ title: "Brown snake spotted in Brisbane", paragraph: "A venomous eastern brown snake was relocated from a suburban yard.", source: "Google News" }] Snakes.format_report(items).split("\n") end PaintSamples.register("bingo") do Bingo.format_start_message(players: %w[alice bob], prize: 250).split("\n") end PaintSamples.register("wheel") do segments = Wheel::DEFAULT_SEGMENTS Wheel.format_spin_result( user: "alice", segment: segments[2], index: 2, segments: segments ).split("\n") end PaintSamples.register("btop") do stats = { cpu: { percent: 46, value: "46.0", max_value: "100.0", label: "CPU", fill_style: Btop::STYLE_FILL }, mem: { percent: 50, value: "8.0G", max_value: "16.0G", label: "Mem", fill_style: Btop::STYLE_FILL }, swp: { percent: 25, value: "1.0G", max_value: "4.0G", label: "Swp", fill_style: Btop::STYLE_FILL }, dsk_root: { percent: 60, value: "60.0G", max_value: "100.0G", label: "/", fill_style: Btop::STYLE_FILL }, dsk_mnt_d: { percent: 40, value: "400.0G", max_value: "1000.0G", label: "/mnt/d", fill_style: Btop::STYLE_FILL }, load: { percent: 50, value: "2.0", max_value: "4.0", label: "Load", fill_style: Btop::STYLE_FILL }, net: { percent: 12, value: "12.0M", max_value: "1.0G", label: "Net", fill_style: Btop::STYLE_FILL } } system_info = { host: "archbox", os: "Arch Linux", kernel: "6.12.1-arch1-1", uptime: "10d 12h 34m", packages: "1234", cpu: "AMD Ryzen 7 5800X", procs: "42", threads: "156", net: "eth0 4.7G↓ 1.9G↑" } Btop.build_report(stats, system_info: system_info).split("\n") end PaintSamples.register("clock") do ClockReport.format_status(enabled: true, lines: 3).split("\n") end PaintSamples.register("flip_time") do ClockReport.format_flip_entry( time_label: "8:01", flip_word: "lob", lines: ['Short throw. "Jake lobbed the ball."'], source: "manual" ).split("\n") end PaintSamples.register("aip") do AipReport.format_plan_reply( preview: "add weather plugin", body: "Step 1: scaffold plugin\nStep 2: add BOM lookup", model: "gpt-5.5-high-fast", total_tokens: 200, duration_s: 4.2 ).split("\n") end PaintSamples.register("ala") do match = { name: "Setonix brachyurus", common_name: "Quokka", rank: "species", occurrence_count: 2603, kingdom: "Animalia", family: "Macropodidae" } AlaSpeciesReport.format("quokka", match).split("\n") end end