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.
635
questions
2
votes
0
answers
27
views
Tic Tac Toe CLI in Clojure
I wrote a command line tic tac toe game in Clojure. I've broken this post into three sections: Feedback Requests, Gameplay, and Code
Feedback Requests
I'm looking for feedback on:
How "idiomatic&...
3
votes
2
answers
120
views
First tic tac toe game. want to see if valid or needs improvement
Just finished my first java class that taught me all the way up to oop and abstract classes. Decided to start some projects over the summer. Started with tic tac toe since it sounded fairly easy to do....
4
votes
1
answer
49
views
Haskell 2-player TicTacToe terminal game
I want to get better at functional programming so I started with this simple 2-player TicTacToe game. Next I want to add a simple min-max algorithm to make it a 1-player game, but before that I'd like ...
6
votes
1
answer
394
views
Tic Tac Toe Basic C implementation
Is my implementation idiomatic?
Does it suffer from any undefined behaviour?
Any pointers/tips would be greatly appreciated. Particularly, I think that the winner function could be improved.
...
3
votes
2
answers
232
views
Tic-tac-toe OOP Minimax Algorithm
I wrote a module that I intend to use in my next tic-tac-toe project. All it is is a class that stores the boardstate along with some methods/properties. The biggest thing is the minimax alg. As shown ...
18
votes
3
answers
3k
views
A tic-tac-toe game in C
I am (trying) to learn the C programming language for fun with my father's book "The C Programming Language". I tried writing a tic-tac-toe game in C. I have no professional experience, so ...
5
votes
2
answers
978
views
another Tic-Tac-Toe Game
I have a bit of experience in programming but not that much. I was trying to create a TicTacToe Game in Javascript. I was doing my best to have a good structure. I was thinking about using classes, ...
2
votes
1
answer
61
views
Text-based tic-tac-toe in bash (continued)
I wrote this two-player tic-tac-toe program in bash. To make a move, you enter a number between 1 and 9 which corresponds to the square:
...
6
votes
1
answer
175
views
Text based tic-tac-toe in bash
I wrote this two player tic-tac-toe program in bash. To make a move you enter a number between 0 and 8 which corresponds to the square:
0|1|2
3|4|5
6|7|8
This is ...
3
votes
1
answer
235
views
Beginner C# console TicTacToe program
I've been learning to program in C# for a couple months and wanted some feedback regarding a project I completed. Criticism and constructive feedback is what I'm after, so bring it on! I know there ...
4
votes
2
answers
144
views
Beginner's attempt at TicTacToe
This is my attempt at making a basic TicTacToe game to play against another human player or a computer controlled opponent. The project was a lot harder for me than I initially thought it would be!
I ...
5
votes
1
answer
209
views
Tic-tac-toe with JS
I am a beginner and was hoping for some honest feedback on my js code. I struggled quite a bit on this, I did ask gpt to explain some concepts which I find it’s good for but wrote it all myself.
<...
3
votes
1
answer
125
views
Simple Tic-tac-toe in Python
I am a beginner programmer who coded a simple Tic-tac-toe in Python for practice. Any feedback, especially regarding best practices and tidying up the code, is appreciated.
...
3
votes
1
answer
243
views
GUI Tic Tac Toe game with UNBEATABLE AI players
This is an updated version of my Tic Tac Toe game with AI players, it is related to GUI Tic-Tac-Toe game with six AI players - part 1: the UI. But that question is more than two weeks old and no one ...
2
votes
0
answers
142
views
GUI Tic-Tac-Toe game with AI, part 3: control and logic
This is the last part of the series of posts about my GUI Tic Tac Toe game, the previous two question are GUI Tic-Tac-Toe game with six AI players - part 1: the UI and GUI Tic-Tac-Toe game with six AI ...
5
votes
0
answers
252
views
GUI Tic-Tac-Toe game with six AI players - part 1: the UI
This is a huge project that I have worked on for the past few months, it contains 16 scripts, one of the scripts is used to analyze the other scripts. There are 111004 characters in all the script ...
2
votes
1
answer
135
views
Tic-tac-toe game for Windows console
I am doing C++ for over a year and this is my game I tried making tic-tac-toe. And it's also my first program that uses multiple source files.
main.cpp
...
2
votes
0
answers
118
views
Python tic-tac-toe using tkinter
I recently made this tic-tac-toe program using tkinter, but I am quite new to tkinter, so I would be grateful for tips on how to improve the program. (Note that the actual tic-tac-toe logic is being ...
2
votes
2
answers
251
views
Java Tic-Tac-Toe Game Implementation - Seeking Feedback and Best Practices
I have recently developed a Java program for a simple Tic-Tac-Toe game and would like to request a code review to improve its quality and learn from experienced developers. Below is the code for my ...
3
votes
1
answer
138
views
Highly flexible tic-tac-toe terminal game in python
I have created a two-file tic-tac-toe game, with board.py containing most of the internal workings of the playing board. I intended to have ...
10
votes
3
answers
1k
views
Here is a Tic Tac Toe game in Python using functions
I am a new programmer, learning from youtube and other sites I can get my hands on. The assignment was clear. Create a Tic Tac Toe game using functions as much as possible and where needed.
I am ...
2
votes
1
answer
86
views
TicTacToe OOP approach in Kotlin
I wrote a terminal-based TicTacToe game in Kotlin to practice both Kotlin and OOP. Any feedback on structure and code would be appreciated.
Board.kt
...
5
votes
1
answer
415
views
Noughts & Crosses (tic-tac-toe) revisited (using C++20 modules)
This is a development of Nought and Crosses (tic-tac-toe) in C++ a learning project in C++. This time using C++20 modules. As before, any suggestions on improvements in style, clarity (or anything ...
4
votes
1
answer
456
views
This is a Tic Tac Toe game in Python for 2 players on a keyboard using functions
I have written a Tic-Tac-Toe game for two players, where each player uses the same keyboard in Python
I'm happy with all kinds of feedback from this community, it is very much appreciated. I am ...
4
votes
2
answers
529
views
Text-based Tic-Tac-Toe
I am just beginning to learn coding and decided to create a text based tic tac toe board as my first solo C++ project. My goals were as follows:
be able to test if there is a winning state on any ...
2
votes
2
answers
140
views
OOP tic-tac-toe
I have created my first personal project - tic tac toe game. It is my first time approaching code using Object-Oriented paradigm and I would like to get feedback on it and on aspects where I can ...
1
vote
1
answer
160
views
Beginner Java Tic-Tac-Toe
I had a Tic Tac Toe assignment for class and the program seems to work fine but I feel like the exception/input handling could be done in a much better way. Is this a good way to approach the ...
4
votes
1
answer
288
views
Tic Tac Toe console game in c++
For learning purposes i wrote a Tic Tac Toe game in object oriented manner.
I have question about storing players in game class - Players(cpu and human) are derived from virtual class players and ...
2
votes
1
answer
153
views
Tic Tac Toe game (Haskell)
I have written a tic-tac-toe game in Haskell and was wondering if anyone could provide any hints on how it could be improved
...
8
votes
2
answers
1k
views
Nought and Crosses (tic-tac-toe) in C++
Learning coding with my daughter again. This is our first C++ program. I'm sure there's much that could be improved on. Any comments gratefully received.
New version here: Noughts & Crosses (tic-...
2
votes
1
answer
80
views
"Tic-Tac-Toe" implemented in Python
With the following code I implemented the mini-game "Tic-Tac-Toe" in Python. However, I am still a beginner in programming and I wanted to ask if someone could give me some tips on how to ...
0
votes
2
answers
422
views
OOP Tic Tac Toe Game
I have built a project OOP Tic Tac Toe. I am beginner-intermediate developer. Can you tell me what I can improve, what I did wrong and what to look up to? This is my first OOP project. I'm happy that ...
7
votes
2
answers
3k
views
Tic-Tac-Toe game in C++
My friend is kind of new to coding and he decided to write a console tic-tac-toe game. He then showed me his code and I thought it would be cool to optimize it a bit and rewrite in my own way. I tried ...
-2
votes
1
answer
240
views
Determine winner of a TicTacToe game
i'm trying to find the winner of a 3x3 TicTacToe game. I user input N which is number of moves, and then N moves like (1,0), (0,2), etc. (X strats the game). At the end of the game the program should ...
1
vote
0
answers
127
views
Tic tac toe java swing
I am new to swing and GUIS in general. I am not sure how to structure projects with gui so help me fix mistakes I have done in this project
Main:
...
-1
votes
1
answer
252
views
Tic tac toe game - my first code using pointers in cpp [closed]
Below is the game code written in cpp.
This is the first time I have consciously used pointers.
I can't handle the logic of winning. I have no idea how to solve this in a different, more accessible ...
9
votes
1
answer
2k
views
Object-oriented programming for tic-tac-toe (only 66 lines) in Python
I am looking for criticism or direction for simplifying this game. I plan to build a player class and Parent that into a terminal player and a my first machine learning minimax algorithm.
For that ...
3
votes
1
answer
154
views
OOP Tic Tac Toe Console C++ Program
Board.h
...
6
votes
1
answer
354
views
Tic-Tac-Toe Code
I'm a beginner in Python programming, been doing it for only a few weeks and I decided to make a tic-tac-toe game in the Python interpreter. I'm looking for feedback on the program and any way I can ...
2
votes
2
answers
134
views
Need Criticism for my first Tic Tac Toe Project
Overview
This is my attempt at a Tic Tac Toe game. I need some criticism and some ideas on what I could do better, because I know somethings need to be cleaned up.
Quick Notes
I also couldn't figure ...
2
votes
1
answer
268
views
Minimax method for Tic Tac Toe
I have this program for minimax tic tac toe
...
1
vote
1
answer
172
views
Tic Tac Toe front end
I made a tic tac toe game using JavaScript. I tried to focus on a logical and well structured program. Could someone give me some feedback on the structuring of the JavaScript code?
...
1
vote
1
answer
139
views
Tic Tac Toe - Python
I made a program that allows a player to play Tic Tac Toe against a computer. Of course, I didn't make it analyse the slightly harder algorithms, as I am just a beginner at programming. Are there any ...
3
votes
1
answer
93
views
Tic-Tac-Toe - JS + HTML
Coming from a python background, I recently started learning django, currently at the javascript section. This tic-tac-toe code is to familiarize myself with javascript basic concepts. No application ...
2
votes
2
answers
263
views
JavaScript code to check whether X won a tictactoe game
My code is already doing what I want, so it's functional, now my concern is, if there is a way to make it easier to read or even better and shorter my code, it's supposed to check if 3 'X' or 'O' are ...
2
votes
1
answer
79
views
Tic Tac Toe on the command line in Scala
This is my first Scala program, so I'd appreciate any feedback but especially feedback specific to Scala, for example situations where I could have utilised a feature better or where I've done ...
2
votes
1
answer
165
views
my first Tic-Tac-Toe game
This is my first post here, as I just started learning a bit of code pretty recently through "Automate Boring Stuff".
In one exercise, to learn about dictionaries, it was shown how to build ...
2
votes
1
answer
322
views
Design Tic Tac Toe Interview Problem [Python 3]
Practicing objected oriented design. This time, it's designing the TicTacToe game. One difference between the real TicTacToe game is that I've made my TicTacToe game to have variable sized board.
...
3
votes
1
answer
779
views
Noughts and Crosses Python3
I'm trying to get more coding experience and decided to start small with a basic noughts & crosses game.
Any feedback is welcome and below are the items I think I should add
a print out of an ...
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 ...