Share your repls and programming experiences

← Back to all posts
Tic-Tac-Toe
CyanCoding

https://repl.it/@CyanCoding/Tic-Tac-Toe

As a fun side project, I built this awesome Tic-Tac-Toe game (with three AI levels) in May 2017.

Voters
sojs
Itsmeme25
Joodsn
elcorreodeangel
iissmart
RamYadla1
longcircuit
AammarMansuri
FrancisPan
Mack5
Comments
hotnewtop
johnnyfrancis

....
646 warnings generated.
 ./main
Uhh

SilvermoonCat

hmm I beat impossible in 3 moves, easier than normal mode

Peaseboy2234

RobertThompson4

If you do 7 then 8 then 9, you will win 95% of the time.

NathanPp

i beat impossible in 5 moves pog

NathanPp

nobody upvote or downvote this ever again

EphrySanthosh

I hacked the program by pressing x after telling it to play and telling the difficulty

zakdakidd

I like it

IsaacAlexander2

How do you start playing?

AaronMa4

@IsaacAlexander2 u just type in play

IsaacAlexander2

@AaronMa4 Thanks

MeetaGupta


The impossible level can be beaten in three moves!!! can make It better.

FloCal35

I beat the impossible mode

FlaminHotValdez

I was a bit surprised when a tic tac toe program took 2600+ lines of code, no tic tac toe should be that long. Also it generated 646 lines of code, and "Impossible" isn't really impossible(It's beatable in 3 moves)

DavidLi17

I beat the impossible level in 3 moves!!!!!!
Hahahahahahahahahahahahahaha!!!!!!!!!

DavidLi17

I beat the impossible level in 3 moves!
HHHHHHHHHHHHHHHHAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHAAAAAAAAAAAAAAAAA!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
and beat it on first try!

codingduck


ummmmmm wut:| also scroll bar all that...

DavidLi17

@codingduck We like ducks. We can be friends!

DavidLi17
YuAndy

I beat the impossible level in 4 moves!!!!!!
Hahahahahahahahahahahahahaha!!!!!!!!!

DavidLi17

@YuAndy I did it in 3 moves!!!!!!!!!!!!!!!!!!!!

TonyWu4
AmazingMech2418


Impossible mode seems to have lost its right for its name... It was actually very easy to beat...

applesX
[deleted]

cool game!

ebest

code warningserrors sure can kill!

and HOW did this get the 5th most votes in ALL the posts!?!?!?

-Ebest

[deleted]

Nice job! Enjoyed playing.

Mello742

i beat impossible mode in 4 moves hahaha!!

TerrorbuildLuna

@Mello742 me too

applesX
Nanowrimoijk

beat impossible, thats what comes when you play against yourself =(

maxballard

It works and all, but no tic tac toe program like this should be 2000 lines long. You can put a lot of the stuff you have into specific functions. You repeat yourself many times, and basically just hardcoded the game. This will work for a simple game like tic tac toe, but if you wanna progress farther as a programmer you need to actually learn how to program.

CyanCoding

@maxballard Haha, thanks for the tip. Do note though that I made this over a year and a half ago, and it's not even in the same language I use now. But yes, I have gotten over that bad habit.

m_23s

DEAD

m_23s

SHUT UP MAN WHAT U GONNA DO BRUV/ I FIND YOU

honchkrowabcd

impossible isin't impossible

OwenBradstreet

Proud :)
https://storage.googleapis.com/replit/images/1531403205473_8b0e31c28b54fa4243890294b258a9f3.pn

CameronHowell1


Ytb

Spyder101

Holy cow great job! The code works smooth and he difficulties hold up their reputation...

zacdisbury

well well well that's cool