d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Question About Tic Tac Toe > Beginner
Add Reply New Topic New Poll
Member
Posts: 619
Joined: Jun 8 2016
Gold: 0.00
Dec 18 2016 02:54pm
Hey, I've been doing Tic Tac Toe games which currently holds player vs. player mode.
But now the game should be turned on player vs. computer (would use a random generator not computer)
Can it be written easily over this or should I start new one?
Member
Posts: 14,631
Joined: Sep 14 2006
Gold: 575.56
Dec 19 2016 04:19pm
ya it'd be super easy just make a 3x3x2 array for positions (3x3 board x2 old/new position)
you could make a difficulty slider too pretty easily that held % chance of choosing the best move
make it so it always defends a 3 in a row first
if there isnt a 3 in a row use the odds to pick between random or best move
Member
Posts: 619
Joined: Jun 8 2016
Gold: 0.00
Dec 19 2016 05:07pm
Quote (Ideophobe @ Dec 20 2016 01:19am)
ya it'd be super easy just make a 3x3x2 array for positions (3x3 board x2 old/new position)
you could make a difficulty slider too pretty easily that held % chance of choosing the best move
make it so it always defends a 3 in a row first
if there isnt a 3 in a row use the odds to pick between random or best move


Thanks for response. I made new Tic Tac Toe which asks size of it and how many marks for win.
I got everything setup expect the check if someone wins, will be looking forward. :)
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll