Let's discuss your "Tic Tac Toe Game"

Greetings, Fellow Campers!

This topic is for listing and review of Tic Tac Toe Game projects built as a part of FCC challenges. Please stick to these basic rules to keep the topic clean:-

  • Post your Codepen (or other) link to your project as a general reply to this topic.
  • For Codepen links use the following format to avoid embedding the pen:-
Project Link - [http://codepen.io/santakmishra/full/pgqOYq/](http://codepen.io/santakmishra/full/pgqOYq/)
  • Post reviews as a specific reply to the link which you are reviewing.
1 Like

Project Link - http://s.codepen.io/MutantSpore/debug/jWWYLo/

5 Likes

Project Link - http://codepen.io/evilloria/full/JXqMRV/

Hi kire73 When im choosing left edge, than uper edge than left top corner than bottom left corner i win, i think you should reconsider computer strategy.

1 Like

TicTacToe anyone? Comments?
Project link - http://codepen.io/kendsr/full/YWXBVJ/

1 Like

Thought this project would be a cake-walk when I began… simple table, formatting, event processing… how hard could that all be? Ha! The AI near-killed me! But it was worth it! :slight_smile:

Casey

7 Likes

Project Link - [http://codepen.io/Calibay/full/jrPWRE/] (http://codepen.io/Calibay/full/jrPWRE/)
This is the first project that I tried out using a canvas to draw the tic tac toe grid and X’s/O’s … I just wanted to try something different from buttons and grids.

1 Like

Project Link - http://codepen.io/galencorey/pen/oLNqyB

It’s still beatable… I need to figure out how to write a minimax algorithm. Any suggestions for resources that will help me understand it better?

1 Like

Nice job with the AI. I am still tying to figure out how to write the minimax algorithm. Any suggestions for resources?

Small suggestion for yours - at the beginning, before you choose x or o, it seems like you should be able to click but you cant because of the hover effect. I think it would be more intuitive if there was no effect, or if you were already assigned a default letter and had the option of switching later.

I love the layout and user experience. intuitive and worked as expected. The AI could use a little work, it felt like the computer player was trying not to win. I really like that you can play a friend and that it automatically lets the loser of the last game go first.

Hi :slight_smile:

I think you are commenting on the wrong person.

Mine doesn’t have play a friend features.

haha, sure did, yours looks great and I couldn’t beat it at all!

Still working on the computer logic.

Just finished mine up. Pretty happy with the result: Tic-Tac-Toe.
Let me know what you guys think!
Best resource I found for implementing minimax: http://neverstopbuilding.com/minimax

1 Like

I’m impressed. I was thinking of trying to use canvas but it just seemed like too much work, yours came out looking pretty awesome though!

Project Link - Tic Tac Toe

Features:

  • Kid friendly colors.
  • Two levels of difficulty.
  • Uses Vector graphics for game-board and playing pieces. Each piece is unique.
  • Responsive design.

Hard mode AI is all ‘home grown’. For the challenge I did not use minimax algorithm. This took way longer than I had expected.

Normal mode is good for young kids, easy to win.
In Hard mode the best you can do is tie. ( I hope… )

LOVE the design, but I can’t seem to scroll down all the way?

1 Like

Project Link - http://codepen.io/elrolfe/full/dXGKzZ/

Homegrown AI put together by trial and error. Easy level is basically randomly selecting squares unless there is a blocking or winning move available. Good mode puts some more logic into it, but still has vulnerabilities. Expert mode has everything I could come up with to force a tie or loss.

Project Link - http://codepen.io/perezvon/full/beVwxQ/

Took a very, very long time to get the minimax algorithm right, but I think I’ve got it.

UI is very basic. If the player selects to play as O the algorithm has to run through every single possible game state to make a move, but then always chooses the top-left square. There must be a way to make that more efficient.

Love to hear your thoughts!

You could write some code so that if the algorithm is making the first move of the game, it automatically picks the upper left corner. Or you could pick any random corner as a first move. If Minimax is coming back with a corner as the best clear-board first move, it really doesn’t matter which corner you start with. You only really need to start running boards through Minimax once the player has placed a piece, giving you an unknown board state.