r/Python • u/[deleted] • Jun 08 '20
I Made This First python project, it's a bit simple but feeling pretty good about it.
30
u/Haboux Jun 09 '20
Would you mind sharing it? I have an algorithm that plays tic tac toe. I only need an interface and i'm not good creating one. It's your choice ofc.
4
6
Jun 09 '20
I don't mind sharing :)
2
u/1Mario_55 Jun 09 '20
RemindMe! 1 day
2
1
u/RemindMeBot Jun 09 '20
There is a 8 hour delay fetching comments.
I will be messaging you in 15 hours on 2020-06-10 06:46:01 UTC to remind you of this link
CLICK THIS LINK to send a PM to also be reminded and to reduce spam.
Parent commenter can delete this message to hide from others.
Info Custom Your Reminders Feedback 2
u/XeoPlay123 Jun 09 '20
Do you have a git repository? If you do pls link it
1
1
1
5
5
Jun 09 '20
grats dude. just went past the vast majority of people who start coding. You should be feeling proud of yourself!
1
2
56
u/lucas_was_here Jun 08 '20
Omg, Player 2 is such a noob...
6
-35
74
u/SeucheAchat9115 Jun 08 '20
Nice user interface :) next you need a bot using the minimax algorithm
35
Jun 08 '20
and then optimize it with alpha beta pruning ;)
27
u/Roborob03 Jun 08 '20
And then train an ml algorithm to perform just as well ;D
47
u/sombradeduvida Jun 08 '20
And then add blockchain integration, turn into a dapp
24
9
6
6
u/Pella86 Jun 09 '20
Cool project! I like the graphics!
I did this a while ago https://github.com/Pella86/ExtendedTris
It's like a super tic tac toe which actually require a strategy to play. Is done in Tkinter. Maybe can inspire you to extend yours!
2
1
Jun 09 '20
sorry for the late reply, I really wanted to share you code and I created a github account(just now).
https://github.com/chandlerbing123/gittrial
(I hope i send the right link as well creating a repository)
here is the link, and thank you for your reviews everyone :)
5
u/hojo4646 Jun 09 '20 edited Jun 09 '20
Bruh I suck ass at making graphics, that's pretty fricken lit. Closest not ass gui I've made was a tkinter simple piece of garbage for downloading videos off YouTube for editing sound effects
1
u/OnlySeesLastSentence Jun 09 '20
Try pysimplegui.
It's really helped me a ton
It's basically a GUI for using tkinter lol
3
u/hojo4646 Jun 09 '20
Tried that and realized it's just my lack of artistic ability that makes my stuff look bad lol.
1
u/OnlySeesLastSentence Jun 09 '20
Oh, it's all good. I'm no pro either, but it beats having a console or spending 20 minutes trying to convince a window not to flash.
0
Jun 09 '20
[deleted]
2
u/hojo4646 Jun 09 '20
Lol, I didn't wanna bring up webpages. I'd say I've had more luck than python guis messing with electron/html,css,JavaScript but it's like comparing a pile of dog crap to a pile or human crap. Template Master race
5
u/kaelan36 Jun 09 '20
Looks really great!
Just a heads up in case you didn’t notice, the Os have a little line in the top right corner right after you place it but once you place another piece it goes away. Pretty harmless bug but I just wanted to mention it jic you hadn’t realized it was there.
4
u/OnlySeesLastSentence Jun 09 '20
You are now banned from /r/qualitycontrol for not noticing that the X also has that arror (I know what I said).
1
u/Seebyt Jun 08 '20
How do i create a Field like this?
1
1
Jun 08 '20
I have little to no experience on GUIs, but maybe just put it as a picture? would that work?
1
u/Seebyt Jun 09 '20
I think its easier to create a grid, draw it and use it for your gamelogic instead of simply importing a picture and program an underlying logic.
Im looking into pygame now, but again, is there some sort of function to draw grids/shapes?
1
Jun 09 '20
the grid is just a turtle drawing, I used simple turtle elements like forward , penup , pendown and left,right to just draw a line, you just give the coordinates where you want to place your pen and then to draw, for both horizontal and vertical lines, and run it in a loop, I thought this would be the easiest way :)
1
1
1
2
Jun 09 '20
Oh god please bless the second player and let him/her win because he/she is also your child. ameen. Just kidding. BTW nice work. Keep it up.
2
2
u/MajorMajorObvious Jun 09 '20
Nice! I think that I would print Player and Turn when setting up the UI and reprint 1 or 2 depending on the turn to reduce flickering.
It's pretty impressive how well you put the UI together too!
2
2
2
u/greggyz Jun 09 '20
Not sure what others think but I totally love it. Very inspirational. I hope one day I will be able to make this one.
1
1
u/theshubhagrwl Jun 09 '20
Nice! I also have made a Tic-Tac-Toe but I used pygame. The part where I most struggled was design😅
1
u/OnlySeesLastSentence Jun 09 '20
That's neat. I like that it's animated as opposed to having it statically pop in (I'm guilty of this).
1
1
1
0
0
0
-6
99
u/echoaj24 Jun 08 '20
nice! you can type hideturtle() to remove the arrow