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
9 votes
3 answers
1k 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-...
user avatar
  • 143
-1 votes
0 answers
50 views

Calculate board positions after each move in tic tac toe

In a game of tic tac toe I am trying to calculate all board positions after every move. We make the following assumptions. X always goes first and is designated with a 1. O goes second and is ...
user avatar
  • 253
6 votes
1 answer
61 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 ...
user avatar
1 vote
2 answers
147 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 ...
user avatar
  • 119
1 vote
0 answers
29 views

2-player Tic Tac Toe in Python using tkinter

I am somewhat a beginner programmer, and this is my first project using tkinter. Any advice, tips or feedback to improve would be appreciated. ...
user avatar
1 vote
0 answers
25 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 ...
user avatar
2 votes
1 answer
83 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 ...
user avatar
0 votes
1 answer
65 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, ...
user avatar
  • 119
3 votes
1 answer
206 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 ...
user avatar
0 votes
1 answer
81 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 ...
user avatar
  • 11
4 votes
2 answers
202 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 ...
user avatar
2 votes
1 answer
203 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/...
user avatar
3 votes
1 answer
168 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 ...
user avatar
3 votes
1 answer
234 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 ...
user avatar
  • 31
5 votes
1 answer
85 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. ...
user avatar
1 vote
2 answers
58 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-...
user avatar
  • 141
2 votes
1 answer
37 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 ...
user avatar
  • 21
3 votes
0 answers
58 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? ...
user avatar
  • 131
4 votes
2 answers
86 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 ...
user avatar
3 votes
1 answer
68 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 ...
user avatar
2 votes
2 answers
143 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 :) ...
user avatar
  • 41
4 votes
2 answers
145 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 ...
user avatar
8 votes
1 answer
434 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 ...
user avatar
3 votes
2 answers
156 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 ...
user avatar
2 votes
2 answers
80 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 ...
user avatar
0 votes
2 answers
115 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 ...
user avatar
2 votes
3 answers
546 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. ...
user avatar
  • 21
4 votes
2 answers
190 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 ...
user avatar
  • 752
1 vote
0 answers
41 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 ...
user avatar
  • 11
2 votes
2 answers
271 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. ...
user avatar
4 votes
4 answers
1k 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 ...
user avatar
2 votes
1 answer
87 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 ...
user avatar
2 votes
4 answers
121 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. ...
user avatar
3 votes
1 answer
206 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 ...
user avatar
3 votes
2 answers
160 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 ...
user avatar
  • 31
2 votes
1 answer
91 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 ...
user avatar
3 votes
1 answer
165 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 ...
user avatar
8 votes
2 answers
392 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 ...
user avatar
1 vote
1 answer
72 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. ...
user avatar
  • 135
1 vote
1 answer
98 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 ...
user avatar
  • 135
2 votes
1 answer
77 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 ...
user avatar
  • 21
9 votes
2 answers
1k 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 ...
user avatar
4 votes
0 answers
56 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 ...
user avatar
7 votes
1 answer
168 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! ...
user avatar
  • 73
3 votes
1 answer
135 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. ...
user avatar
  • 137
4 votes
2 answers
263 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 ...
user avatar
  • 41
3 votes
2 answers
704 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 ...
user avatar
1 vote
1 answer
91 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 ...
user avatar
  • 13
3 votes
1 answer
143 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 ...
user avatar
3 votes
3 answers
97 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 ...
user avatar

1
2 3 4 5
12