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.
636
questions
1
vote
2
answers
168
views
Hash game in C optimization
I developed this hash game in C for my college, but i need to optimize this code, can you help me?
it works well, but I need it to be a little more organized and faster, the rand function is the only ...
9
votes
3
answers
2k
views
A Simple Tic-Tac-Toe Game
I wrote a simple tic-tac-toe game in Python. I'm pretty much a novice, but I do have some experience with coding other things in Python. I just wanted to see if I was capable of writing a simple tic-...
6
votes
1
answer
109
views
Tic Tac Toe Module in Rust: Implementing "new"
Intro
In order to get familiar with and improve my Rust skills I coded Tic-Tac-Toe. I want to write good Rust code, any feedback regarding why my code isn't in a Rust style or improvements that could ...
1
vote
2
answers
315
views
Tic-Tac-Toe vanilla JS Pseudo OOP
I'm working on building a simple game in vanilla JS (tic-tac-toe). Some weeks ago I created a functional MVP and asked some questions about it (Vanilla JS Tic-Tac-Toe). The code worked, but it was a ...
1
vote
1
answer
302
views
Finding the winner of a tic-tac-toe game in Swift
Working on the problem Find Winner on a Tic Tac Toe Game, I took several hours longer than an artificial time constraint the site had for mock interview purposes. This leads me to wonder if my ...
4
votes
1
answer
265
views
Console Tic-Tac-Toe game in Rust
While having experience with other languages I only recently started learning Rust and I was hoping to get some feedback on my little beginner project, especially regarding style (stuff like too many ...
2
votes
1
answer
276
views
Avoiding nested loops in a TicTacToe algorithm JavaScript
I wrote a quick algorithm that detects a win in a TicTacToe Game.
fn game() loops through a simulated ticTacToe board, finds all ...
1
vote
1
answer
316
views
Vanilla JS Tic-Tac-Toe
During 2021 I was learning to code but I left it because I didn't have enough time and energy. Today I started my come back to coding so I created a simple tic-tac-toe game.
I didn't use objects, ...
3
votes
1
answer
581
views
Tic-tac-toe game with Board class and enum for players
I've been learning C++ on my own and working solo on trying to implement some of the concepts I've been reading.
I'm wondering if this is the correct group to get someone to point me to other info ...
0
votes
1
answer
142
views
basic tic tac toe
I looked a little into HTML a year ago but decided to try python yesterday and came up with this for tic-tac-toe. I have no programming experience and I haven't yet looked at other peoples versions of ...
4
votes
2
answers
254
views
A beginner's implementation of tic-tac-toe
I recently tried to make a tic-tac-toe game with my knowledge. I haven't implemented any fancy algorithms like minimax. I made it entirely with my might. As a result, I haven't been able to beat the ...
2
votes
1
answer
337
views
Tic Tac Toe game v2
I made the changes that were suggested to improve the program in the previous version.
I would like to know if there is anything to improve in terms of handling object oriented programming, variable/...
3
votes
1
answer
917
views
Tic Tac Toe in Python with OOP
I programmed the tic-tac-toe game in Python using object oriented programming and I wanted to share it here to get some feedback
...
3
votes
1
answer
2k
views
Tic Tac Toe game in Java FX
I have programmed a Tic Tac Toe game in JavaFX and would appreciate feedback. Have I gone wrong anywhere?
One issue I found and fixed was that I encountered a "Effectively final" error when ...
5
votes
1
answer
129
views
Text-based Tic-Tac-Toe in C
I have written a text-based tic-tac-toe game in C. Are there any ways I can further improve the code?
It uses an ENUM to indicate the player type and two bitfields to indicate the board.
...
1
vote
2
answers
262
views
Simple terminal TicTacToe
Coming from JavaScript, I needed to learn C++ recently, so I thought a great way to start is to create a simple terminal-based tic-tac-toe game. I encountered some difficulties especially with multi-...
2
votes
1
answer
76
views
Text-Based TicTacToe in c++
The goal of this program is to create text based tic-tac-toe
What I know:
Base level java (till arrays & functions)
The same goes for c++
What I did:
I) Variable count: This used to count the ...
3
votes
0
answers
87
views
Tic-Tac-Toe Backend for Commercial Use
I've been working on a tic-tac-toe backend for an interactive commercial-use display, and was wondering if I could get some feedback on it?
...
4
votes
2
answers
136
views
Ruby CLI TicTacToe
I have done Tictactoe game in Ruby. It is my first Object Oriented project in Ruby. I would like to separate all program into a few classes such as Player Board and Game. I want to use more OOP best ...
3
votes
1
answer
366
views
Variable Grid Size Tic Tac Toe
Tic-Tac-Toe from scratch. Code Ugliness check before I implement the win-condition and maybe get set in to bad habits.
Questions:
As implemented:
Better to pass board between functions or set as a ...
2
votes
2
answers
5k
views
Tic tac toe win checker in python?
I made a tic tac toe win checker that represents a 3 x 3 board as a list of list with variables X O B as 'X', 'O' and ' '. However the input can be any valid and invalid board of tic tac toe game.
e.g....
2
votes
2
answers
216
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 :)
...
4
votes
2
answers
175
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
1
answer
583
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
...
3
votes
2
answers
585
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
2
answers
85
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
2
answers
141
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 ...
2
votes
3
answers
1k
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.
...
4
votes
2
answers
451
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
0
answers
86
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
2
answers
1k
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
4
answers
6k
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 ...
2
votes
1
answer
312
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
4
answers
164
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
1
answer
308
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
1
answer
236
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
1
answer
146
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
1
answer
435
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
2
answers
1k
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
1
answer
88
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
1
answer
123
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
1
answer
190
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
2
answers
2k
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
0
answers
79
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
1
answer
489
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
1
answer
173
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.
...
4
votes
2
answers
591
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
2
answers
2k
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
1
answer
253
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
1
answer
173
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
...