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.

Filter by
Sorted by
Tagged with
4
votes
5answers
453 views

Tic Tac Toe in C++ with classes

My first language is Python and I learned considerably a good amount of it. So now I started learning C++. I know the basics of C++ and about classes and inheritance. This is my first serious project ...
1
vote
1answer
36 views

Tic Tac Toe game with an adjustable grid size in Tkinter

I've created a full Tic tac toe game in Tkinter that has single and multiplayer modes. The single player mode then has a hard and easy difficulty. The easy difficulty is just choosing a random open ...
3
votes
4answers
99 views

My tic tac toe minimax implementation

This is my first time using StackExchange. I did not have any idea what this website for, but I guess is a place to review the code? So, I'm just going to give it a shot. ...
3
votes
1answer
131 views

Python tic-tac-toe AI

I just finished my Tic-tac-toe AI, and would be very grateful for opinions and comments on that project. I would like to add it to my 'entry level Python developer portfolio'. README: Simple AI that ...
3
votes
2answers
121 views

Beginner learner: Python 3.9.6 tic-tac-toe code and questions about optimization

I am just beginning to learn Python, and thought I would give myself a challenge using the lessons I have learned so far. I am following the Udemy course, Automate the Boring Stuff with Python. The ...
2
votes
1answer
57 views

Web-browser Tic-Tac-Toe game

I have made the tic-tac-toe game as part of The Odin Project course. I think the code I have written just works but is not properly optimized for performance and it could be made simpler. This is ...
3
votes
1answer
88 views

A TicTacToe command line game in c++

So I've just started teaching myself C++ a few weeks ago and I've decided to work on an implementation of Tic Tac Toe, using the command line. The program allows a human to play against a bot, which ...
8
votes
2answers
132 views

Representing Tic-Tac-Toe using a binary BitBoard

So I have been learning more about binary numbers lately, particularly in related to describing a gamestate. While perhaps chess is the most natural candidate I wanted to start of with something ...
1
vote
1answer
49 views

Tic Tac Toe (new draft)

I have implemented suggestion and created new draft of the Tic Tac Toe program. Please review and let me know where I can improve. ...
1
vote
1answer
76 views

Tic Tac Toe program

I have created a simple Tic-Tac-Toe program. Can someone please review it and let me know where I can improve. Here we can play against computer. Program start by putting 'X' at the center that is at ...
2
votes
1answer
64 views

How to increase the success rate of my Tic Tac Toe AI that uses the Minimax Algorithm?

this is my first post here! I am working on a Tic Tac Toe AI in Python that uses the Minimax Algorithm to beat either a computer or a normal player. As of now, It has approximately 70% chance of ...
9
votes
2answers
778 views

Python: Tic Tac Toe Game

I am here to ask for some more experienced programmers to critique my first project. I wanted to see where I lack and what I can improve on. Thank you for taking time out of your day to help me better ...
4
votes
0answers
48 views

Minimax algorithm efficiency

I'm programming Tic-Tac-Toe using minimax algorithm with alpha-beta pruning after taking Harvard's CS-50. My logic is working perfectly, except for the return time of minimax (especially on the first ...
7
votes
1answer
144 views

A beginner's first Tic Tac Toe implementation

I've been teaching myself Python and decided to make a Tic Tac Toe game for a bit of practice. Any criticisms or pointers are welcome! ...
3
votes
1answer
108 views

Tic Tac Toe in Python 3.x

I made Tic Tac Toe in Python. Standard code review, please tell me ways to improve. I am very new to Python, so please do not criticize very roundabout ways. Thanks. ...
3
votes
2answers
139 views

Tic-tac-toe in python with OOP

I'm a beginner to intermediate in programming, and created a Tic-tac-toe game in python. I plan to add an AI player and a GUI using pygame. Any improvements I could make to the code, especially with ...
3
votes
2answers
124 views

Tic-Tac-Toe in C language

I'm beginner on doing programming and just started learning C language. Then, i decide to make Tic-Tac-Toe as my first program. My Tic-Tac-Toe summary: User can choose whether want to play 2 player or ...
1
vote
1answer
61 views

Text-based Tic Tac Toe in Python (First Project)

I've recently started learning Python again after a long time away from it and doing MATLAB at university. Today, I spent some time working on a first little project of mine. Right now it works as it ...
3
votes
1answer
115 views

Tic-tac-toe implementation

I created a tic-tac-toe game implementaiton in rust. What I can do to make this tic-tac-toe code a better code? game.rs ...
3
votes
3answers
93 views

How can I better test whether the player won in my tic-tac-toe?

I created a tic-tac-toe using java and I would like to know if there are any practices that I can improve and make the code cleaner and more performative ...
3
votes
2answers
62 views

Console TicTacToe in C

Would you be so kind as to review my TicTacToe implementation I wrote in C? I wrote this blind (not looking up other implementations). You can find it on Github here. Any input and/or suggestions ...
0
votes
0answers
31 views

Vanilla JS Tic Tac Toe

I would appreciate a code review - specifically of the javascript - for a tic tac toe game that I have built. I am looking for feedback on where improvements can be made in the overall structure, ...
9
votes
3answers
2k views

Tic-Tac-Toe code using c#

I am a beginner coder and was wondering how to improve my c# console code. It makes a tic-tac-toe game. ...
1
vote
2answers
87 views

Determining winning line in TicTacToe game

I am trying to write code to determine a win in tic-tac-toe game. In this question, I am not focusing on the whole game, I am only interested in the question of how to determine that the game ended ...
2
votes
2answers
109 views

Classic games selection

It is an extremely basic mini-game menu. Link to my game. I know there are more experienced C++ programmers than me, so it would be a great help if you help make my code better. Thank you. PS: First ...
3
votes
1answer
98 views

Tic-tac-toe Game Optimization (C++)

I made a Tic-tac-toe game where you can play against the program or with another player in C++ and I know the code is far too long for what it is. I've tried to optimize it using non-void functions (...
2
votes
3answers
211 views

Tic-Tac-Toe game in Java

I had to write a TicTacToe game as an assignment for class & the last program I wrote used a few continues here and there. When I asked for a peer code-review I was informed that I should use ...
2
votes
2answers
84 views

Java Tic Tac Toe console

everyone!I have created a bit ugly looking Tic Tac Toe console game using Java. I'm learning how to code and I would love to hear some comments about my code. Because it's quite streatforward, I'm not ...
3
votes
1answer
53 views

tic-tac-toe algorithm improvement in C

I 've made a tic-tac-toe game in C, I want some tips on how to improve it since the program is a little bit too long. (500 lines with comments) How I done the game: Mapped a 3x3 Matrix like the board ...
1
vote
1answer
126 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 ...
1
vote
1answer
85 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 (...
5
votes
1answer
246 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
150 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
88 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
323 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
36 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
83 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 ...
3
votes
1answer
139 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 ...
10
votes
3answers
4k 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 ...
2
votes
2answers
103 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 ...
4
votes
1answer
227 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. ...
10
votes
3answers
1k 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
110 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
211 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
53 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
465 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
2k 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 ...
11
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:...
6
votes
2answers
151 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 ...

1
2 3 4 5
12