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

Command Game Request chess #19

Closed
PrajjwalDatir opened this issue Jun 22, 2021 · 4 comments
Closed

Command Game Request chess #19

PrajjwalDatir opened this issue Jun 22, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@PrajjwalDatir
Copy link
Member

Chess Game Using WA Messages.
Players will send Chess Notations like e4, e5, Nf3, Qxf5, ...
And Bot will reply with Current board image with relevant caption if necessary.

My Approach :

  • chess @player1 @player2 (self if no second parameter given) will start the game.
  • Use Chess API : example to get board details and to run logic under the hood.
  • Use board matrix received from Chess API to build an Image of the current board and deliver it as a WA Message
    with caption as @player1 played %move. Now it's @player2's turn.
  • chess QUIT will quit the game and the person sending the message will be considered as lost.
  • x amount of inactivity will result in player losing i.e. match end

For example,
Consider 3 characters

  • player1
  • player2
  • Bot
    And Prefix as &

Refer this for Chess notations

Example Chat =>

player1 : &chess @player2

bot :

image
Game has began between @Player1(white) & @player2(black)

player1 : &chess e4

bot :

image
@Player1 played e4. Now it's @player2's turn.

player2 : &chess e5

bot:

image
@player2 played e5. Now it's @Player1's turn.

player1 : &chess Bc4

bot :

image
@Player1 played Bc4. Now it's @player2's turn.

player2 : &chess Nc6

bot :

image
@player2 played Nc6 Now it's @Player1's turn.

player1 : &chess Qf3

bot :

image
@Player1 played Qf3. Now it's @player2's turn.

player2 : &chess Nd4

bot :

image
@player2 played Nd4. Now it's @Player1's turn.

player1 : &chess Qxf7+

bot :

image
@Player1 played replaced f7 pawn with Queen and has threatened the opponent king.
It's a checkmate!!! @Player1 has won 🥳 🔥


Drop a comment if you have any doubts or need any clarification on my idea.

Further ideas :

  • giving people in-game currency based on Bets of the players which can be passed as an extra optional parameter while starting the game.
@AlenVelocity
Copy link
Member

@shubham8550

@AlenVelocity AlenVelocity added the enhancement New feature or request label Jun 22, 2021
@SomnathDas
Copy link
Member

Theoretically easy peasy

@PrajjwalDatir
Copy link
Member Author

@SomnathDas Enjoy the journey 🚀

@AlenVelocity
Copy link
Member

Updates here https://github.com/AlenSaito1/chess-node

@AlenVelocity AlenVelocity pinned this issue Jun 22, 2021
AlenVelocity added a commit that referenced this issue Jun 24, 2021
AlenVelocity added a commit that referenced this issue Jun 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants