<commit_before>require_relative "island_tiles"
require "chingu"

include Chingu

# An area impassable to ships
# Other things can be built onto it
class Island < GameObjectMap
    def initialize(options = {})
        super(options)
        @width = 32
        @height = 32

        island_size = 20
        island_size = options[:island_size] if options[:island_size]

        generate island_size

        @map = []
        @land.compact!

        # Create the drawable objects
        @land.each do |point|
            @map.push(Grass.create(
                  :image => Image["grass.png"],
                  :x => point[:x] * @width,
                  :y => point[:y] * @height
            ))
            
        end

        @coast.each do |beach|
            @map.push(
                Beach.create(
                  :image => Image["beach.png"],
                  :x => beach[:x] * @width,
                  :y => beach[:y] * @height
                )
            )
        end

        house_pos = @land.first
        @map.push( House.create(
            :x => house_pos[:x] * @width,
            :y => house_pos[:y] * @height,
            :resident_count => 5
        ) )<commit_msg>Tried using a different position for houses<commit_after>require_relative "island_tiles"
require "chingu"

include Chingu

# An area impassable to ships
# Other things can be built onto it
class Island < GameObjectMap
    def initialize(options = {})
        super(options)
        @width = 32
        @height = 32

        island_size = 20
        island_size = options[:island_size] if options[:island_size]

        generate island_size

        @map = []
        @land.compact!

        # Create the drawable objects
        @land.each do |point|
            @map.push(Grass.create(
                  :image => Image["grass.png"],
                  :x => point[:x] * @width,
                  :y => point[:y] * @height
            ))
            
        end

        @coast.each do |beach|
            @map.push(
                Beach.create(
                  :image => Image["beach.png"],
                  :x => beach[:x] * @width,
                  :y => beach[:y] * @height
                )
            )
        end

        house_pos = @land[3]
        @map.push( House.create(
            :x => house_pos[:x] * @width,
            :y => house_pos[:y] * @height,
            :resident_count => 5
        ) )
{'fraction_non_alphanumeric': 0.11811023622047244, 'fraction_numerical': 0.006216328222130129, 'mean_word_length': 1.39009900990099, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 21, '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': '1621584', 'n_tokens_mistral': 729, 'n_tokens_neox': 688, 'n_words': 168}