Questions tagged [tic-tac-toe]
A game, also known as "Noughts and Crosses", in which players take turns placing marks on a 3 × 3 grid in an attempt to form a line of three consecutive marks. You can also use this tag for variants of the game.
530
questions
1
vote
1answer
61 views
Simplest possible Tic Tac Toe AI in Python
Last week I challenged myself to create the smallest possible code for a Tic Tac Toe game with an AI as opponent. Smallest possible in regards to say least number of characters used. The requirements ...
0
votes
1answer
51 views
TicTacToe: If an error messages do not appear straight away
I am fairly new to Python and have tried to create a tic tac toe game that is completely automatic, where you can see if a player1 has an advantage if you let it ...
-1
votes
1answer
29 views
python simple 2 player tic tac toe [closed]
There are 2 issues with my code:
a) If I put numbers in the following order (as my input) '1', '2', '3', '4',
'5', '6', '7' -- this where the game should end, because X (or O) would have
won now (...
6
votes
1answer
104 views
Tic-Tac-Toe Game vanilla JS/CSS
I am practically brand new to coding and this is my first "real" project I've been attempting. It's an attempt at a vanilla JS game with selectable layout and win conditions (partially ...
5
votes
2answers
144 views
Console-based TicTacToe game in Python
I created a console-based TicTacToe game in Python. So far, everything works as expected. I decided to keep the class static, because I figured there would be no use for multiple game states at once. ...
5
votes
1answer
78 views
Tic Tac Toe Shared Keyboard Game
I wrote a Tic-Tac-Toe game for two players, where each player uses the same keyboard. It's not a school project or anything, I just thought this would be fun to code for practice.
I'm open to and ...
4
votes
1answer
254 views
Noughts & Crosses UML Class Diagram
I was told I need code in order for someone to review my UML Class Diagram for my Noughts and Crosses console application. I would like to know if it's intuitive, whether you could make a program ...
1
vote
0answers
32 views
Changing player between bot and human in python tic tac toe [closed]
As a noob I'm creating Tic Tac Toe on Python (Jupyter Notebook used). Granted my coding looks almost childish compared to some of the more advanced examples i've seen, but I am still learning the ...
3
votes
1answer
57 views
Tic Tac Toe using the __init__ constructor
I recently learned about classes in python. I only have a brief understanding of them, but I think it's good enough for me to write a tic tac toe program (been ...
4
votes
1answer
134 views
Noughts & Crosses (Final Version)
I've made a major update to my Noughts & Crosses program, this ISN'T a duplicate! I know it's not good to use system("pause") and system("cls"), however, I just wanted to make ...
11
votes
3answers
1k views
A Tic Tac Toe game in C++
I am a beginner programmer and have made a tic tac toe program in c++. I need some help with my memory management can anyone review and help me. This is my code
...
3
votes
2answers
88 views
Noughts & Crosses (Tic Tac Toe) OOP Design
I was wondering if someone could review my object oriented design for my Noughts & Crosses program. Yesterday I posted a procedural version and now I've done an OOP version.
Can someone tell me ...
5
votes
1answer
110 views
Noughts and Crosses (Tic Tac Toe) C++ Console Application
I was hoping someone could review my C++ console based noughts and crosses (Tic Tac Toe) application. I have not looked at any other documentation, this is purely programmed from the top of my head. ...
11
votes
3answers
816 views
Tic Tac Toe Game using Python
I'm brand-new (just joined today) to code review and I am super excited to share my tic tac toe game code with all of you! Please let me know what I could fix up in my program to make it more ...
2
votes
2answers
87 views
Xs and Os game logic in Java [closed]
I am practicing programing in Java. I have started to make a Xs and Os (Tic-Tac-Toe) game and I began with baseline logic of the game. I would appreciate any advice on my programming style, what am I ...
4
votes
1answer
137 views
Tic Tac Toe game in Python - Beginner
I'm a beginner to python and as part of my course I'm instructed to create a simple tic tac toe game.
I'd be very appreciative and interested of any insight, criticism, instructions, best practices or ...
6
votes
1answer
52 views
Game of Noughts and Crosses Feedback
this is my 2nd project on Python. I created a game of Noughts and Crosses(Tic-Tac-Toe) that you can play against the computer. What are your thoughts on my implementation of the game? Is there ...
7
votes
1answer
202 views
Tic Tac Toe in React (official tutorial)
Hi everyone !
I am new to react and more of a backend developper (working with Django, Symfony, Code Igniter mostly).
But I want to get better at frontend and React seems to have a great community so ...
6
votes
2answers
663 views
C++ OOP Tic Tac Toe
This is a follow up to my question here. Well, it ain't exactly a follow-up, but more like my next project after the last one
I created a tic tac toe game using object-oriented programming
You all ...
12
votes
4answers
2k views
TicTacToe in Python OOP
I did this Tic-Tac-Toe as an exercise for OOP.
I would like to know possible improvements (the method main loop is too rock and roll, if you have suggestion to reduce it and improve readability).
Code:...
7
votes
2answers
122 views
JavaScript Tic Tac Toe implementation
I've been trying to get into web development, so I made a quick Tic Tac Toe implementation. It feels messy to me, but I'm not sure what is really considered to be good practice and what not. Any poor ...
0
votes
1answer
89 views
Python Tic-Tac-Toe [closed]
I made a very primitive Tic-Tac-Toe using Python and I would like a grade on how well I coded the game. What code was there that could've been simpler or more efficient? And any advice you can give me?...
-4
votes
1answer
79 views
8
votes
2answers
93 views
Managed to make Tic-Tac-Toe as someone who is new to coding
I'm trying to build up a toolset of best practices, so as this is my first complete program (if you can call it that) writen in c++, I know there's definitely better ways of doing things
...
2
votes
1answer
148 views
Tic-tac-toe game using Pygame
I programmed a tic-tac-toe game using pygame. It's the first game I make. I'd really appreaciate any comments you have about the coding style and any improvements that could be made.
...
6
votes
2answers
833 views
TicTacToe with AI in C
I recently started learning C, though I have some experience in other languages. I recently wrote a TicTacToe AI using the Minimax Algorithm in C. I would like to know how I could write better C.
<...
1
vote
1answer
59 views
A Tic-Tac-Toe AI based on two rules
So i made a tic tac toe bot with the following rules (its not unbeatable)
...
4
votes
0answers
62 views
Text-based tic-tac-toe game in Python
I'm working on a text-based tic-tac-toe game, mostly for fun and because I'm learning programming. I would appreciate any comments you could give me to improve it.
Main structure:
Uses a Board class ...
4
votes
2answers
122 views
Tic Tac Toe, No OOP
I was looking at a code review of a Tic Tac Toe game in Python when I recalled a talk about not using classes, and I wanted to see if I could write a readable, working implementation of the game ...
8
votes
4answers
430 views
Python text-based Tic Tac Toe
I created a simple text-based Tic Tac Toe game in Python using OOP. Currently the computer moves are completely random - I plan to add some sort of algorithm later (no idea how to do that yet though)
...
0
votes
1answer
48 views
Tic Tac Toe in Python practice 2
The previous code on codereview
I'm quite novice here so apologies for any silly mistake in advance
I've been writing a simple tic tac toe game which is a part of my course in udemy
Since this is my ...
1
vote
1answer
55 views
Tic Tac Toe in Python practice
I'm quite novice here so apologies for any silly mistake in advance
I've been writing a simple tic tac toe game which is a part of my course in udemy
Since this is my first project, I want to do my ...
7
votes
1answer
380 views
Improved Tic Tac Toe game. Made in C
For my second week of learning C, I decided to remake the Tic Tac Toe game I made last week, but in a different style (as some of you recommended me). This is my final product on the whole Tic Tac Toe ...
11
votes
5answers
1k views
Simple Tic Tac Toe game inside terminal
Hello fellow programmers. I started learning C last week and today I wanted to see if I can make a working program, so I made this game:
...
3
votes
1answer
82 views
Tic-Tac-Toe in C
I have implemented a Tic-Tac-Toe game in C which can be played as two-player or with a computer player.
...
12
votes
1answer
2k views
I made Tic Tac Toe in C
I made this Tic Tac Toe game in C. It works but I thinks it could be programmed better. You have the option to play alone or between two players. It also lets the player select if he uses 'X' or 'O'.
...
3
votes
2answers
90 views
Tic-Tac-Toe in Java
I am currently learning Java; I could really use some help from more experienced programmers.
How can I clean up my Tic-Tac-Toe code? What mistakes have I made? Can I use more exception handling? I ...
1
vote
1answer
44 views
Given a Tic-Tac-Toe gamestate return all wins as text
In a game of Tic-TacToe given a gamestate:
game_board = [ [1, 0, 1],
[0, 1, 0],
[0, 1, 0] ]
I have written the following piece of ...
2
votes
1answer
70 views
OOP Based TicTacToe - Logic Improvement/Best Practices
Looking for any feedback to improve practices on the following logic, and I have removed large chunks of documentation to reduce noise. I feel the areas that could expect heavy criticism are the win/...
4
votes
1answer
95 views
Minimax based Tic Tac Toe
I am attempting to make an unbeatable Tic Tac Toe game using a simplified minimax algorithm. The code looks like this:
...
7
votes
1answer
127 views
A simple tic tac toe game in Javascript/HTML/CSS
This is my first web app written in JS. I would like to know how the code can be improved in terms of style and structure, especially in terms of following JS's conventions and general heuristics. I ...
5
votes
1answer
136 views
Almost unbeatable Tic Tac Toe
JavaScript beginner here! I have written a Tic Tac Toe game is JS that seems to be unbeatable (Title says 'almost' because I'm not sure if it's really unbeatable or just I can't beat it :) ). I ...
3
votes
1answer
91 views
Tic-Tac-Toe implementation c++
I created this game just to practice my skills. I've been coding for a few years and I'm decent at data structures and algorithms. I want to know how to improve my implementation.
...
3
votes
2answers
111 views
Checking if naughts or crosses win in Tic Tac Toe
I am working on a coding challenge for Tic Tac Toe. I am calculating the results and inserting them into the database.
However I have a long and messy if statement, which checks if the array's values ...
3
votes
0answers
60 views
Noughts and Crosses Terminal Game with AI
I created a game which can play tic-tac-toe with: 0 players (AI vs AI), 1 player (human vs AI) or 2 player (human vs human).
Here is the AI function which wraps around my innermost function. This ...
2
votes
1answer
71 views
C# Tic Tac Toe Game with SOLID
i'm doing a Core for a Tic Tac Toe game.
I have my code with a dynamic size of the board (can be 2x2 to 10x10, if is 7x7 we need a 7 characters in a row to win , if is 4x4 we need 4 etc) , This code ...
1
vote
1answer
66 views
2 player CLI Tic-Tac-Toe game in python
This is a fully functional code that i have just completed today. I just want to know how efficient is this. and how could i improve it or if theres any bugs that i have miss out.
...
5
votes
2answers
79 views
CLI Tic-Tac-Toe in python
Is there any way I could make my Tic-Tac-Toe board more aesthetically pleasing?
Is there anything else I can improve besides the look of the board?
...
1
vote
0answers
47 views
Tic Tac Toe game logic
I've implemented tic-tac-toe in TypeScript before; now I'm porting it to Elixir. As before, this is pure game logic, no UI involved. I'm very new to Elixir, so any suggestions are appreciated.
The ...
1
vote
1answer
72 views
Total beginner Tic Tac Toe game in Python
I've decided to learn Python about 2 weeks ago, been going through various books and videos, and I've decided to try my hand at programming a Tic Tac Toe game. I was somewhat successful (it doesn't ...