/connect_four

Connect Four is a classic board game where players take turns trying to create a line of four of their own pieces without being blocked by their opponent.

Primary LanguageRuby

connect_four

Connect Four is a classic board game where players take turns trying to create a line of four of their own pieces without being blocked by their opponent.

Installation

  • download: gem install connect_cuatro
  • run: connect_cuatro

P2P Considerations

  • Ruby Code
    • Ensure that your Ruby server is listening on 0.0.0.0 instead of localhost or 127.0.0.1. This will allow it to accept connections from any IP address, not just the local machine.
  • Firewall Rules
    • On Linux: You can use iptables to open a specific port. For example, to open port 12345:
  • Cloud Instance Security Groups (If Applicable)
    • If you're running your server on a cloud instance like an AWS EC2 instance, you'll also need to configure the instance's security group to allow incoming connections on the port your server is listening on.
      1. Go to the AWS EC2 Dashboard.
      2. Select your instance and navigate to its "Security Groups."
      3. Edit the inbound rules to allow TCP traffic on your port (e.g., 12345).