Share your repls and programming experiences

← Back to all posts
Tic Tac Toe
LizFoster (606)

Yes, I have been gone for a while, and I apologize for that. My huge PocketMonsters project has been put on hold for the sake of my sanity, and I want to get back to coding things that I really enjoy. I'm back now, though it seems that most of the people who were active then aren't so active anymore..

Anyways, I made a Tic-Tac-Toe code. Many have done this, so it is nothing ground-breaking, but I did this by scratch. Twice. I actually coded it elsewhere, and when I tried to copy it over, I messed up and lost it all wwwww

Everything should work fine, and it only took about half an hour collectively to rewrite this in full. I hope you all enjoy!

Commentshotnewtop
ZDev1 (654)

this is cool
also welcome back

Codemonkey51 (864)

Welcome back, yes most ppl are less active... I certainly am cool game, I commented on ur other comment already but maybe try pygame for the Pokémon thing

ClintHance (0)

You get and "A" for aehffort.

EpicGamer007 (592)

Cool! One suggestion is to make it graphic or whatevs.

LizFoster (606)

@AbhayBhat Ah, yes, that would be much nicer to look at! I'd have to find out how to set it up in turtle, though as long as the modules work there, I should be good to go! I unfortunately don't know tkinter well enough to just use that instead...wwwww

Bookie0 (4019)

good work!

just a tip: maybe indicate what number goes to what square; I dont have a number keypad and thought 3 would be here:

instead of here:

;)

LizFoster (606)

@Bookie0 Ah, yes. I'll do that really quick then! Sorry for the confusion. ^ ^

Bookie0 (4019)

ok cool np

•;•
\_/
/ \

(lol my terrible ascii drawing)

@LizFoster

Bookie0 (4019)

ah yes perfect, much clearer! :D @LizFoster

LizFoster (606)

I'll optimize and shorten the code later, since I am a bit fried on this game for a bit..wwwww

SixBeeps (3064)

I actually coded it elsewhere, and when I tried to copy it over, I messed up and lost it all wwwwwwwwwwww

Ouchhh

LizFoster (606)

@SixBeeps Yeah, that hurt.. T^T

Luckily I still remembered the majority of it, so it didn't take too long to rewrite. I shudder to imagine what would happen if that happened to my PocketMonsters code... O___O"

Codemonkey51 (864)

What about github then you just upload ever so often and it allows reverts and other ppl to download ezily (or a private repo if you don't want others to see) @LizFoster

CodingCactus (3039)

How is the Pokémon project going?

LizFoster (606)

@CodingCactus I am taking a break from it presently, so that I do not go crazy!wwwwwww

I am still hung up on the problem of drawing the screen in a timely manner, since I do not know how to make multiple turtles draw at once (not yet at least..)! It's difficult to solve this problem, since I have yet to find a method to do so in Python that I could learn and execute in a reasonable amount of time, let alone one that might work for turtle. Besides, searching for things related to turtle generally doesn't come up with anything too useful, since it is not used quite as often as something like tkinter.

CodingCactus (3039)

@LizFoster well I don't know much about turtle, but there is a thing called trace() which might help? Basically, before you start drawing, do t.trace(0) and then after you have drawn everything, do t.trace(1) (assuming you have t = turtle.Turtle()) That might help ¯\_(ツ)_/¯. Also of course there is t.speed() which hopefully you have already set to 0

LizFoster (606)

@CodingCactus Yes actually, that could help. I may have to lower my standards here, as I was hoping to make the transition between each frame smooth. However, it will be way easier to make substantial progress if I make it (sort of) jump for each frame. It wouldn't remove from the experience too much, either!

CodingCactus (3039)

@LizFoster well I hope it all goes well, good luck!

Codemonkey51 (864)

Maybe use py game, you might need to learn it but I heard it is really good check it out here pygame repl here @LizFoster

LizFoster (606)

@Codemonkey51 Thank you! That should help out substantially.