Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Connect Four! #244

Open
SebastiaanZ opened this issue Aug 3, 2019 · 5 comments

Comments

@SebastiaanZ
Copy link
Member

commented Aug 3, 2019

Connect Four

When it comes to tabletop-style games, you can't go more retro than Connect Four! In this game, you drop disks in your color into a grid hoping to get four of your disks in a row before your opponent manages to do just that.

For this feature, program a Connect Four game for our bot in which two players can compete with each other. The user interface should consist of reactions that lets the player indicate in which row they want to drop a disk. Make sure that it all works with one embed that gets updated instead of generating a new embed for each turn.

Example of what it could look like:

Connect Four example embed

Implementation details

  • Write a command that starts a game, allowing a second user to join;
  • Find a nice way to display the current state of the grid;
  • Implement the game logic with a reaction interface and make sure it checks for winners;
  • (Optional) Add a feature to allow a player to play against the bot (simple AI).

Make sure that you use a single embed for each game by editing it instead of creating a new embed for each turn. In addition, if you want to implement an AI for the game and want an example, there are implementations available online. Try to create your own version of it, but don't make it "perfect"/unbeatable.

Additional information

  • Add your feature to the evergreen season.
  • Keep us updated on your progress by leaving comments!
  • Make sure to give you commits a descriptive commit message
  • Please note the style guide and conventions listed in the various contrib documents
  • If you want to include graphics, make sure they have a permissive license
@Suhail6inkling

This comment has been minimized.

Copy link
Contributor

commented Aug 5, 2019

I wanna work on this if that's okay

@spyoungtech

This comment has been minimized.

Copy link
Member

commented Aug 6, 2019

I have a simple ConnectFour implementation I made a few years back: https://github.com/spyoungtech/connectfour

The Board.show method and prints could be changed to send the same in discord messages.

Feel free to use, either in whole or in part, if you want.

@SebastiaanZ

This comment has been minimized.

Copy link
Member Author

commented Aug 6, 2019

@Suhail6inkling Sounds good to me. Decide for yourself if you want to use (parts) of @spyoungtech's code or take inspiration from it. Programming it yourself from scratch may be part of the fun, but inspiration can't hurt either.

@sco1 sco1 moved this from Approved to In progress in Seasonalbot Tracking Aug 8, 2019

@MarkKoz

This comment has been minimized.

Copy link
Member

commented Aug 17, 2019

Hi @Suhail6inkling, can you give us an update on your progress with this?

@Suhail6inkling

This comment has been minimized.

Copy link
Contributor

commented Aug 17, 2019

Adding the finishing touches on this and should be all done! hopefully will PR within the week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
4 participants
You can’t perform that action at this time.