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
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.@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
Refer this for Chess notations
Example Chat =>
player1 : &chess @player2
bot :
Game has began between @player1(white) & @player2(black)
player1 : &chess e4
bot :
@player1 played e4. Now it's @player2's turn.
player2 : &chess e5
bot:
@player2 played e5. Now it's @player1's turn.
player1 : &chess Bc4
bot :
@player1 played Bc4. Now it's @player2's turn.
player2 : &chess Nc6
bot :
@player2 played Nc6 Now it's @player1's turn.
player1 : &chess Qf3
bot :
@player1 played Qf3. Now it's @player2's turn.
player2 : &chess Nd4
bot :
@player2 played Nd4. Now it's @player1's turn.
player1 : &chess Qxf7+
bot :
@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 :