I just finished my first portfolio project and I would like a feedback on it

Hello,
I just finished my first portfolio and I am pretty sure that there are aspects of the code that I can improve on and make it more efficient.
I created Tic Tac Toe game that requires 2 players. I struggled with implementing the check_win method so I had to implement every possible way of winning.
The project works fine and I am happy with it, but I would love to hear feedback from you so I improve on further projects in future.

link to repo: GitHub - E-Aghbari/Tic-Tac-Toe

1 Like

Hey its pretty good and if you want to upscale this then you can explore and learn more about gui. You can read about tkinter library here or you can check this out too freecodecamp. Hope this helps you @ebrahimaa.

Thanks for your reply.
Regarding the method that checks for a winner. Is there a better way to implement it?

1 Like

Yes I’ve done this same project using Java in first year and instead of using else-if conditions like you did on the combinations I made a list of winning combinations and check for winners combination by iterating over that list of combinations. This will decrease the repetition of else-if statements you have in your code but this method is a bit complicated then your approach if you are not familiar with iterations on list/arrays in java. Hope it helps you with logic building @ebrahimaa :slight_smile: I’m here if you need further help.

1 Like

Oh and one more suggestion please check this video its only 15mins long but its in java don’t worry you just have to understand the logic behind it

1 Like