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

Error resolve for tie game of Tic-Tac-Toe #150

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Rozaki0318
Copy link

I have been enjoying your Tic-Tac-Toe Game and found a following error.

Then, I have added lines to return move = 0 to comMove() function.

I am looking forward to merging this change.

Thanks,


$ python3 TicTacToe.py 
Do you want to play a game (Y/N): Y
-----------------------------------------
Welcome to the tic tac toe game

   |   |   
   |   |  
   |   |   
-----------
   |   |   
   |   |  
   |   |   
-----------
   |   |   
   |   |  
   |   |   

...

Enter a position between 1 to 9: 4
   |   |   
 X | O | X
   |   |   
-----------
   |   |   
 X | X | O
   |   |   
-----------
   |   |   
 O | X | O
   |   |   
Traceback (most recent call last):
  File "TicTacToe.py", line 136, in <module>
    main()
  File "TicTacToe.py", line 119, in main
    insertLetter("O", move)
  File "TicTacToe.py", line 4, in insertLetter
    board[pos] = letter
TypeError: list indices must be integers or slices, not NoneType

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

Successfully merging this pull request may close these issues.

None yet

1 participant