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
3
votes
2answers
49 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 ...
1
vote
1answer
47 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
47 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
80 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
87 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 ...
1
vote
0answers
34 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
26 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
1k 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
79 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
103 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
89 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
155 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
72 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
46 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
99 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
82 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
171 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
148 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
82 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
288 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
33 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
66 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
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 ...
10
votes
3answers
2k 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
93 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
157 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
99 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
186 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
307 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
1k 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:...
7
votes
2answers
124 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
82 views

basic two-player tic tac toe game [closed]

Here is my code: ...
8
votes
2answers
94 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
287 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
982 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
69 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
69 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
127 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
580 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
49 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
61 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
429 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
85 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'. ...

1
2 3 4 5
11