chess icon indicating copy to clipboard operation
chess copied to clipboard

Added a `chess Bot`

Open vishalmishraa opened this issue 1 year ago • 15 comments

closes #51

Added a bot that play against user .

VIDEO :

https://github.com/code100x/chess/assets/64027486/a0e37dff-da2e-47f9-94a4-f3686c2de499

IMAGE :

Screenshot 2024-04-24 at 5 47 39 PM

vishalmishraa avatar Apr 21 '24 22:04 vishalmishraa

hey @hkirat , Structured the file in more better way , all the conflicts are now resolved (for now) . Now it is ready for review.

vishalmishraa avatar Apr 22 '24 00:04 vishalmishraa

Same board colors and pieces being rendered in the play online and play with bot? If not , i think that would be ideal

Bot-Rakshit avatar Apr 22 '24 04:04 Bot-Rakshit

Same board colors and pieces being rendered in the play online and play with bot? If not , i think that would be ideal

yup , i changed it , same for both online and bot . https://github.com/code100x/chess/assets/64027486/ed40e3bf-2dab-4eeb-a9f3-c5224ba7cd27

vishalmishraa avatar Apr 22 '24 06:04 vishalmishraa

hey @hkirat , i beautified the chess Bot UI too , and now it is same as play online mode with better options name like famous chess players, bots. if possible please review it .

vishalmishraa avatar Apr 22 '24 17:04 vishalmishraa

This is great I see you've used chessboardjsx We need to be consistent. Either need to use the library in both the type of games or remove it from both of them

hkirat avatar Apr 22 '24 17:04 hkirat

Happy to merge this as is but then we'll have to update the non bot rooms to use the same components

hkirat avatar Apr 22 '24 17:04 hkirat

Happy to merge this as is but then we'll have to update the non bot rooms to use the same components @hkirat

i also wanted to use that not a bot rooms chessBoard component , but that one required socket , but here i'm not using any socket connection . so i used chessboardjsx library. any suggestion or is it okey for now .?

vishalmishraa avatar Apr 22 '24 17:04 vishalmishraa

@hkirat hey I think we should use the chessboardjsx library. I think it can be easily integrated with chess.js as well. Using just chess.js might cause problems in the future when adding more and more things

Happy to integrate it with existing codebase

nimit9 avatar Apr 22 '24 21:04 nimit9

@nimit9 yeah most websites use chessboardjsx lib , i think it's easier to work with

Bot-Rakshit avatar Apr 23 '24 01:04 Bot-Rakshit

@hkirat hey I think we should use the chessboardjsx library. I think it can be easily integrated with chess.js as well. Using just chess.js might cause problems in the future when adding more and more things

Happy to integrate it with existing codebase

Yup , chessboardjsx can be easily integrated with chessjs ,

vishalmishraa avatar Apr 23 '24 01:04 vishalmishraa

UPDATE

ADDED

- BOT AVATAR

- THEMING

- LEGAL PIECES VALIDATION

Screenshot 2024-04-24 at 5 47 39 PM

VIDEO

https://github.com/code100x/chess/assets/64027486/92792ea9-ec83-43be-a6dd-0abf0db557e8

vishalmishraa avatar Apr 24 '24 09:04 vishalmishraa

hi @hkirat , please check this. , Now this chess Bot is almost similar to chess.com , and regarding chessboardjsx library as nimit said here , it would be better to use chessboardjsx for future needs too.

vishalmishraa avatar Apr 25 '24 15:04 vishalmishraa

The only downside to using chessboardjsx is that a lot of things would be abstracted on the frontend then, thereby giving us less chance to work on the core things of chess.

nimit9 avatar Apr 26 '24 16:04 nimit9

i tried it the pieces are bit laggy with delay can we fix it

janareddyc7 avatar Apr 28 '24 23:04 janareddyc7

i tried it the pieces are bit laggy with delay can we fix it

ok , i checked it again , it is not lagging for me, when i was recording that video my system was lagging , thats why in video it seems like pieces are laggy . and i'm waiting for harkirat to come online to know what to do . i too want to do more enchantment .

vishalmishraa avatar Apr 29 '24 04:04 vishalmishraa