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
17 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 ...
Uriel's user avatar
  • 173
5 votes
2 answers
923 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, ...
Cats's user avatar
  • 61
2 votes
1 answer
57 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: ...
sbottingota's user avatar
6 votes
1 answer
166 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 ...
sbottingota's user avatar
3 votes
1 answer
148 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 ...
Unlived172's user avatar
4 votes
2 answers
140 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 ...
Reslashd's user avatar
5 votes
1 answer
184 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. <...
FeDev's user avatar
  • 61
3 votes
1 answer
123 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. ...
smwt's user avatar
  • 187
3 votes
1 answer
231 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 ...
Ξένη Γήινος's user avatar
2 votes
0 answers
135 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 ...
Ξένη Γήινος's user avatar
5 votes
0 answers
244 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 ...
Ξένη Γήινος's user avatar
2 votes
1 answer
129 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 ...
NikolaTeslaPaga's user avatar
2 votes
0 answers
111 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 ...
sbottingota's user avatar
2 votes
2 answers
241 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 ...
drunk mado's user avatar
3 votes
1 answer
137 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 ...
yrjarv's user avatar
  • 141
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 ...
LindaJuniordev's user avatar
2 votes
1 answer
79 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 ...
random_letter's user avatar
5 votes
1 answer
409 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 ...
scripta's user avatar
  • 501
4 votes
1 answer
409 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 ...
Joris's user avatar
  • 41
4 votes
2 answers
519 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 ...
Alice Aaron-force's user avatar
2 votes
2 answers
132 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 ...
Ebrahim Al-Aghbari's user avatar
1 vote
1 answer
159 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 ...
Drosos-kal's user avatar
4 votes
1 answer
284 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 ...
Paweł's user avatar
  • 43
2 votes
1 answer
141 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 ...
Dean Menezes's user avatar
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-...
scripta's user avatar
  • 501
2 votes
1 answer
78 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 ...
py_programmer_47845's user avatar
0 votes
2 answers
287 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 ...
mcccuklev's user avatar
  • 139
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 ...
Noby's user avatar
  • 115
-2 votes
1 answer
233 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 ...
Dragos Bogdan's user avatar
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: ...
Ivica's user avatar
  • 75
-1 votes
1 answer
245 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 ...
Sebix9000's user avatar
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 ...
Infinite Grasp's user avatar
3 votes
1 answer
148 views

OOP Tic Tac Toe Console C++ Program

Board.h ...
Mohamed Magdy's user avatar
6 votes
1 answer
294 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 ...
Feraminecarts's user avatar
2 votes
2 answers
132 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 ...
Beginner's user avatar
  • 189
2 votes
1 answer
266 views

Minimax method for Tic Tac Toe

I have this program for minimax tic tac toe ...
Abdulahad Ghuman's user avatar
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? ...
morloq's user avatar
  • 119
1 vote
1 answer
129 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 ...
DialFrost's user avatar
  • 123
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 ...
watch-this's user avatar
2 votes
2 answers
246 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 ...
Stein's user avatar
  • 21
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 ...
L68967gy's user avatar
2 votes
1 answer
162 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 ...
Miguel Rodrigues's user avatar
2 votes
1 answer
292 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. ...
whiteSkar's user avatar
  • 165
3 votes
1 answer
735 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 ...
MM360's user avatar
  • 43
1 vote
2 answers
161 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 ...
Hugo Rodrigues's user avatar
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-...
jp207's user avatar
  • 173
6 votes
1 answer
107 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 ...
itsderek's user avatar
1 vote
2 answers
313 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 ...
nabla-f's user avatar
  • 163
1 vote
1 answer
294 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 ...
Curious's user avatar
  • 113
4 votes
1 answer
259 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 ...
D4v1d 247's user avatar

1
2 3 4 5
13