r/pythontips • • Sep 05 '22

Python3_Specific My first project

This is my first project can you please tell me your opinions:

https://github.com/khmdvjamshid/Tic-tac-toe-game/blob/main/tic-tac-toe

31 Upvotes

7 comments sorted by

13

u/uSrNm-ALrEAdy-TaKeN Sep 05 '22

Looks like a nifty cli based game and the code is very readable (to me at least).

If you want to take it to the next level and make a window/user interface for it, consider looking into pygame

2

u/[deleted] Sep 05 '22

Thank you

1

u/[deleted] Sep 06 '22

Is it good enough to put on my resume?

1

u/RapsodyXx Sep 05 '22

I love it, i am doing my first project too

1

u/[deleted] Sep 06 '22

Happy coding man, wish you luck

2

u/limoonen Sep 06 '22

As first project it looks pretty clean, good job!

I found couple things to improve:

  1. Add asserts to make sure the input from users are valid if not add messages to make clear what is expected.

  2. I really don't understand why are you using indexing from 1 for board positions (I know it's counterintuitive at the beginning but it's important paradigm to grasp and use).

  3. The function win_check could be rewrited with for loop logic to make it more elegant.

Keep working, as a next step you could try add game mode for one player vs bot.