"""Coordination chatroom game."""

from wallace.networks import FullyConnected
from wallace.nodes import Agent
from wallace.experiments import Experiment


class CoordinationChatroom(Experiment):
    """Define the structure of the experiment."""

    def __init__(self, session):
        """Initialize the experiment."""
        super(CoordinationChatroom, self).__init__(session)
        self.experiment_repeats = 1
        self.num_participants = 3
        self.initial_recruitment_size = self.num_participants
        self.setup()

    def create_network(self):
        """Create a new network."""
        return FullyConnected(max_size=self.num_participants)

    def info_post_request(self, node, info):
        """Run when a request to create an info is complete."""
        for agent in node.neighbors():
            node.transmit(what=info, to_whom=agent)

    def node_type(self):
        """The type of node to make."""
        return Agent

@@ -870,82 +870,155 @@
 def 
-node_type(self):%0A        %22%22%22The type of node to make.%22%22%22%0A        return Agent
+create_node(self, participant, network):%0A        %22%22%22Create a node for a participant.%22%22%22%0A        return Agent(network=network, participant=participant)
 %0A

add create_node to chatroom demo