emilnt1 / SolitareImageRecognition

0 stars 0 forks source link

Priority to see hidden cards. #9

Closed Machnuud closed 2 years ago

Machnuud commented 2 years ago

At the moment the ai makes moves from left to right. We had two black 10's and one was in the bottom of its column and the other had hidden cards under it. It chose not to reveal the hidden cards which was a losing move.

ArmandasRokas commented 2 years ago

Ready for test

Machnuud commented 2 years ago

Still not fixed now it just crashes instead.

Stacktrace:

Traceback (most recent call last): File "c:\Users\emilb\Documents\SolitareImageRecognition\SolitareImageRecognition-1\Ui.py", line 239, in main() File "c:\Users\emilb\Documents\SolitareImageRecognition\SolitareImageRecognition-1\Ui.py", line 222, in main instruction = nextMove(currBoard) File "c:\Users\emilb\Documents\SolitareImageRecognition\SolitareImageRecognition-1\AI\AI.py", line 40, in nextMove curr_result = move(board) File "c:\Users\emilb\Documents\SolitareImageRecognition\SolitareImageRecognition-1\AI\AI.py", line 108, in putColumn possibleFromColumn.append(c, count_columns_from, count_columns_to, board.getCardsLeftColumn[count_columns_from-1]) TypeError: 'method' object is not subscriptable

Machnuud commented 2 years ago

Hurray now it works