Note
For a good gaming experience of the games in the course, we recommend using a desktop or a laptop computer rather than a tablet or smartphone.
Graph Game - Explore the Connections
Description:
1. When you open the game, you’ll see a blank space in the middle of the screen. This space represents the graph, which is a collection of nodes connected by edges.
2. Your task is to create and explore different connections between nodes in the graph. Nodes are represented by circles, and edges are represented by lines.
3. To add a node to the graph:
– Type the name of the node in the “Enter a node” input box at the top of the screen.
– Click the “Add Node” button. You’ll see a new circle representing the node appear in the graph.
4. To create a connection between two nodes (add an edge):
– Type the names of the two nodes you want to connect in the “Enter an edge (comma-separated)” input box.
– Click the “Add Edge” button. You’ll see a line connecting the two nodes in the graph.
5. To remove a node from the graph:
– Type the name of the node you want to remove in the “Enter a node” input box.
– Click the “Remove Node” button. The node and all its connections will be removed from the graph.
6. To remove a connection between two nodes (remove an edge):
– Type the names of the two nodes whose connection you want to remove in the “Enter an edge (comma-separated)” input box.
– Click the “Remove Edge” button. The connection between the two nodes will be removed from the graph.
7. You can click on a node to select it. The name of the selected node will appear in the “Enter a node” input box. This is useful when you want to remove a specific node or add an edge to/from the selected node.
8. You can continue adding nodes, creating connections, and exploring the graph in different ways. Try to create interesting patterns and see how different nodes are connected.
Remember, in a graph, nodes represent objects or concepts, and edges represent the relationships or connections between them. Have fun exploring the connections and creating your own graph!
Note: The initial game setup includes some nodes and connections for demonstration purposes. Feel free to remove or modify them to start with a clean graph canvas.