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
85 views

Tic Tac Toe in object oriented JavaScript

I've been working on a course assignment for 'The Odin Project' and was hoping to get a review of my code. As per the help guide, the code is fully functional. The criteria for this was pretty ...
2
votes
2answers
69 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 ...
2
votes
2answers
120 views

How can I shorten my tic tac toe game?

At the moment, it is simply massive. I already reduced the size by about a hundred lines but it still seems way too big... Would appreciate some help :) ...
3
votes
2answers
97 views

Python TIC TAC TOE Project

I just joined here. I have been doing python for a couple of weeks and I would like for some experienced programmers to review my code. I made this for a school project and I am proud of it. The code ...
8
votes
1answer
376 views

Haskell Tic-Tac-Toe (with automation and GUI)

There are already many Tic Tac Toe posts. But as far as I can tell, none of the ones in Haskell are complete with a GUI Here is my implementation with Gloss. Gist Link for convenience ...
2
votes
2answers
74 views

First C program - Tic Tac Toe 2

I have already posted this program and got some good recommendations on how it can be improved but I would like to further know what can be improved for example: Should dynamic memory allocation be ...
0
votes
2answers
107 views

First C program - Tic Tac Toe

Hi I am a beginner and l would love to hear your opinion on my first C project, how can it be improved in any way, for example dynamic memory allocation isn't used in the program because I didn't ...
4
votes
2answers
156 views

first Go program: Tic Tac Toe

If I formatted my question wrong, feel free to notify me or update, this is my first question on this subforum This is literally my first ever Go project, decided to make a Tic Tac Toe (ironically I ...
1
vote
1answer
49 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 ...
2
votes
3answers
235 views

tic-tac-toe game with a vector

This is my first game ever. I' learning C++ now and I decided to make a game. I saw a snake game that works with the draw-input-logic system and I really liked it. I tried to make a tic tac toe game. ...
1
vote
0answers
28 views

Changing game mode in Tic Tac Toe [The Odin Project] [closed]

I'm posting this here mostly as I posted it over at stackoverflow because the user that answered me recommended it: I'm learning to code with The Odin Project. So far, I've been doing every project ...
2
votes
2answers
149 views

C++ - Tic Tac Toe AI powered by minmax algorithm

This was my previous post on Tic Tac Toe in C++. I received very good feedback and tried to implement all of the improvements. I could not implement some due to the AI needed functions or complexity. ...
4
votes
4answers
630 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 ...
6
votes
1answer
7k views

Tic Tac Toe in MVC

Do I have basics of MVC and SOLID principles right in this simple 'Tic Tac Toe' game? View.java ...
3
votes
1answer
161 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 ...
2
votes
4answers
109 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
2answers
135 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 ...
1
vote
1answer
89 views

A Tic-Tac-Toe AI based on two rules

I made a tic tac toe bot with the following rules (it's not unbeatable): If bot is about to win, it will find the winning move. If bot is about to lose, it will find a move that prevents the other ...
2
votes
1answer
67 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
2answers
69 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 ...
3
votes
2answers
191 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 ...
3
votes
1answer
114 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
207 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
59 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
90 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
73 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
850 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
50 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
151 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
124 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
184 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
1answer
123 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 ...
1
vote
1answer
72 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
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 ...
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. ...
0
votes
0answers
35 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, ...
7
votes
1answer
2k views

Simple Tic-Tac-Toe with Minimax Algorithm - follow up

Based on previous question i implemented most of suggestions. also, i have added Alpha-Beta pruning to minimize the calls. and making the game more generic to accept the board to be any value like 4x4 ...
1
vote
2answers
90 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
110 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 ...
2
votes
3answers
231 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 ...
3
votes
1answer
105 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 (...
1
vote
1answer
90 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 ...
2
votes
2answers
88 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 ...
1
vote
1answer
133 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
votes
1answer
34 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 (...
16
votes
2answers
15k views

Simple Tic-Tac-Toe PHP/Pure HTML

I've been doing a simple Tic-Tac-Toe with PHP, generating only HTML code. A few notes: I didn't bother yet to give an AI to the opponents (the Os), and it is intentional. There is no CSS style to ...
5
votes
1answer
263 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 ...
4
votes
2answers
161 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. ...
4
votes
1answer
95 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
361 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
2 3 4 5
12