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

'NoneType' object has no attribute 'board' #1

Closed
orestisfl opened this issue Nov 23, 2014 · 3 comments
Closed

'NoneType' object has no attribute 'board' #1

orestisfl opened this issue Nov 23, 2014 · 3 comments

Comments

@orestisfl
Copy link

Currently, the point difference is : 3
It's your move, what do you want to do? Type '?' for options. dxe7

Making move : dxe7
R N x K Q B x R
p p x B p p p p
x x p x x x x x
x x x x x x x x
x x x p x x x x
x x x x x p x x
p p p x x x p R
R N B K Q B N x

AI thinking...
Traceback (most recent call last):
File "main.py", line 122, in
startGame(board, playerSide, opponentAI)
File "main.py", line 113, in startGame
move = ai.getBestMove()
File "/tmp/command-line-chess-master/AI.py", line 123, in getBestMove
moveTree = self.generateMoveTree()
File "/tmp/command-line-chess-master/AI.py", line 78, in generateMoveTree
self.populateNodeChildren(node)
File "/tmp/command-line-chess-master/AI.py", line 91, in populateNodeChildren
legalMoves = self.board.getAllMovesLegal(side)
File "/tmp/command-line-chess-master/Board.py", line 397, in getAllMovesLegal
if self.moveIsLegal(move) :
File "/tmp/command-line-chess-master/Board.py", line 388, in moveIsLegal
self.undoLastMove()
File "/tmp/command-line-chess-master/Board.py", line 89, in undoLastMove
self.pieces.remove(promotedPiece)
File "/tmp/command-line-chess-master/Piece.py", line 37, in eq
if self.board == other.board and self.side == other.side and self.position == other.position and self.class == other.class:
AttributeError: 'NoneType' object has no attribute 'board'

@marcusbuffett
Copy link
Owner

Do you happen to have a screenshot instead so I can tell which pieces are black and which are white?

@orestisfl
Copy link
Author

nop, sorry

@marcusbuffett
Copy link
Owner

I think this has been fixed (unfortunately I don't know how to reproduce the bug to check) so I'm closing it for now.

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