<commit_before>import pygame
import math
from cab.util.cab_visualization import Visualization


__author__ = '<NAME>'
__version__ = '1.0'


class Visualizer(Visualization):
    """
    This class incorporates all methods necessary for visualizing the simulation.
    """

    def __init__(self, gc, surface, sys):
        """
        Initializes the visualization and passes the surface on which to draw.
        :param surface: Pygame surface object.
        """
        # TODO: Comment what the modes do, for better overview.
        super().__init__(gc, surface, sys)
        self.draw_agent_mode = 1
        self.draw_cell_mode = 1
        self.gc = gc

    def clone(self, surface, cab_sys):
        return Visualizer(self.gc, surface, cab_sys)

    def draw_agent(self, agent):
        if agent.id == 'hive':
            self.draw_agent_w_color(agent, (100, 0, 255))
        elif agent.id == 'food':
            self.draw_agent_w_color(agent, (255, 255, 0))
        elif agent.id == 'ant':
            self.draw_agent_w_color(agent, (0, 140, 255))

    def draw_agent_w_color(self, agent, color):
        # print(agent.x, agent.y)
        if agent.x is not None and agent.y is not None and not agent.dead:
            print('drawing agent {0}'.format(agent))
            radius = int(agent.size / 1.5)

            horiz = self.gc.CELL_SIZE * 2 * (math.sqrt(3) / 2)
            offset = agent.y * (horiz / 2)
            x = int(agent.x * horiz) + int(offset)

            vert = self.gc.CELL_SIZE * 2 * (3 / 4)
            y = int(agent.y * vert)
            
            pygame.draw.circle(self.surface, color, (x, y), radius, 0)
            pygame.gfxdraw.aacircle(self.surface, x, y, radius, (50, 100, 50))
            # corners = [(x - radius, y - radius),
            #            (x + radius, y - radius),
            #            (x + radius, y + radius),
            #            (x - radius, y + radius),<commit_msg>Changed: removed debugging print statement<commit_after>import pygame
import math
from cab.util.cab_visualization import Visualization


__author__ = '<NAME>'
__version__ = '1.0'


class Visualizer(Visualization):
    """
    This class incorporates all methods necessary for visualizing the simulation.
    """

    def __init__(self, gc, surface, sys):
        """
        Initializes the visualization and passes the surface on which to draw.
        :param surface: Pygame surface object.
        """
        # TODO: Comment what the modes do, for better overview.
        super().__init__(gc, surface, sys)
        self.draw_agent_mode = 1
        self.draw_cell_mode = 1
        self.gc = gc

    def clone(self, surface, cab_sys):
        return Visualizer(self.gc, surface, cab_sys)

    def draw_agent(self, agent):
        if agent.id == 'hive':
            self.draw_agent_w_color(agent, (100, 0, 255))
        elif agent.id == 'food':
            self.draw_agent_w_color(agent, (255, 255, 0))
        elif agent.id == 'ant':
            self.draw_agent_w_color(agent, (0, 140, 255))

    def draw_agent_w_color(self, agent, color):
        if agent.x is not None and agent.y is not None and not agent.dead:
            radius = int(agent.size / 1.5)

            horiz = self.gc.CELL_SIZE * 2 * (math.sqrt(3) / 2)
            offset = agent.y * (horiz / 2)
            x = int(agent.x * horiz) + int(offset)

            vert = self.gc.CELL_SIZE * 2 * (3 / 4)
            y = int(agent.y * vert)
            
            pygame.draw.circle(self.surface, color, (x, y), radius, 0)
            pygame.gfxdraw.aacircle(self.surface, x, y, radius, (50, 100, 50))
            # corners = [(x - radius, y - radius),
            #            (x + radius, y - radius),
            #            (x + radius, y + radius),
            #            (x - radius, y + radius),
{'fraction_non_alphanumeric': 0.12033631108775618, 'fraction_numerical': 0.02233315817130846, 'mean_word_length': 1.9420401854714064, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6942452', 'n_tokens_mistral': 1259, 'n_tokens_neox': 1167, 'n_words': 340}