<commit_before>module Lodo
  class Board
    def initialize
      @string = String.new
      @string.reset
    end

    def draw_pixel(x,y,color)
      @string[translate_to_linear(x,y)] = color
    end

    def save
      @string.save
    end

    def reset
      @string.reset
    end

    private
    def translate_to_linear(x,y)
      if x % 2 == 0
        (8 - x) * 9 + (8 - y) + 16
      else
        (8 - x) * 9 + (y) + 16
      end
    end
  end
end<commit_msg>Add a comment<commit_after>module Lodo
  class Board
    def initialize
      @string = String.new
      @string.reset
    end

    def draw_pixel(x,y,color)
      @string[translate_to_linear(x,y)] = color
    end

    def save
      @string.save
    end

    def reset
      @string.reset
    end

    private
    def translate_to_linear(x,y)
      # even rows go up, odd rows go down
      if x % 2 == 0
        (8 - x) * 9 + (8 - y) + 16
      else
        (8 - x) * 9 + (y) + 16
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.09611451942740286, 'fraction_numerical': 0.022494887525562373, 'mean_word_length': 1.5763157894736841, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '303107', 'n_tokens_mistral': 369, 'n_tokens_neox': 344, 'n_words': 101}