#๐Ÿ”’ Can't identify the bug in the code for Chess Pieces for an Chess engine (pygame)

33 messages ยท Page 1 of 1 (latest)

fleet sapphireBOT
#

@hollow yoke

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

hollow yoke
#

Geez the post got removed

foggy oracle
#

!paste you might want to use this

fleet sapphireBOT
#
Pasting large amounts of code

If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/

After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.

hollow yoke
#

I was trying to learn how to make a chess engine using pygame in python by watching an YouTube tutorial, It was going nicely until I encountered an problem that the same code(which I couldn't make) was not working the same for me and there were no errors. only the Pawn code works and rest works only for black and broken for white.

i spent 2hr trying to find the error but i failed.

weary talon
#

I'm going to sleep now otherwise would have answered your question.

#

A few pointers:

#

You could use a simple array based approach instead of classes.

#

Please refer to CPW (chess programming wiki ) for more information

#

you can also join this server which is specifically made for engine programming

#

h t t p s : / / d i s c o r d . g g / w d Y C V B J 3

quartz ocean
weary talon
#

mod power

#

that is a server made specifically for engine programming.

#

Also if you're just starting out.

#

Follow Code Monkey king on youtube. great guy.
makes tutorials on engine programming.

#

I've followed him too

#

hope this might help you in solving your question

#

as for the bishop moves.

#

please check what happens a capture occurs.

#

or if the directions are correct or not.

#

or if you're correctly checking out of boards

#

which you could do very easily by using a 10x12 board

weary talon
#

goodnight people!

quartz ocean
weary talon
#

it is legit ๐Ÿ˜ญ

#

never mind

#

goodnight!

hollow yoke
#

Alright ill try to do everything you guys, said in the morning its 1AM. Good night!

fleet sapphireBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.