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

AI #1

Open
Zireael07 opened this issue Nov 10, 2022 · 1 comment
Open

AI #1

Zireael07 opened this issue Nov 10, 2022 · 1 comment

Comments

@Zireael07
Copy link

  1. check if can eat is a bit weird for a chess game, I don't understand what it does? does it check for a possible capture of enemy piece?
  2. I don't see a way for AI to figure out what the best move is
@AfonsoCFonseca
Copy link
Owner

AfonsoCFonseca commented Nov 11, 2022

Hey @Zireael07, thank you for the comments 👍🏻
I still need to get back to this game... There's still a lot of refactoring i need to do here.. Anyways, answers below

  1. check if can eat is a bit weird for a chess game, I don't understand what it does? does it check for a possible capture of enemy piece?

It's supposed to be a method that checks if the tile is free or if it has an enemy piece on it and returns the tile or an empty array. From what I remember, I used that method for checking every time the player wants to move or when the ai is choosing the next position

  1. I don't see a way for AI to figure out what the best move is

I wouldn't properly call it AI :p, since it's still a lot of work missing. By now, it only checks for all the possible piece moves and if one of the moves has the possibility to eat one of the player pieces, then that move will be chosen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants