Questions tagged [tic-tac-toe]

A game, also known as "Naughts 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.

24 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
5
votes
0answers
237 views

Tic Tac Toe in Haskell

After reviewing many Tic-Tac-Toe implementations, I decided to write my own. Here it is: Logic.hs ...
3
votes
0answers
25 views

How can I make my Pygame Tic Tac Toe game better?

I have this code ready and it works just fine. But what are the ways by which I can improve this code? I have no CS background and this is my first coding project. I could not paste my entire code so ...
3
votes
0answers
32 views

Implementing a tic tac toe board in python

This is my attempt at making a class to represent a game board for tic tac toe. I normally hate while loops but I used one because I cant seem to make the ...
3
votes
0answers
76 views

Tic Tac Toe game (Game logic, no UI)

I've implemented a simple class for managing a Tic-Tac-Toe game's logic and state in Typescript. This code is intended to be used by a larger program; it doesn't implement any aspects of a UI. I've ...
3
votes
0answers
448 views

React Tic Tac Toe

This is a project that grew out of the React Tutorial and is one of my first efforts at solving React problems on my own. There is a lot of code here and I am sure that there are more concise ways ...
3
votes
0answers
587 views

Python TicTacToe AlphaBeta Program

I am looking for a review of my perfect TicTacToe algorithm. It will be split up into 3 parts: The function The GameState Class The game (NOT well designed) I am mainly looking for tips and comments ...
3
votes
0answers
778 views

Novice implementation of TicTacToe in Haskell

I want to learn Haskell and figured the best way to do it is to write a simple TicTacToe implementation. However the result feels very inelegant and I think it might be the best playground for your ...
2
votes
0answers
162 views

Tic-Tac-Toe with React hooks

I have found similar posts which has some optimizations on Winning-checking logic: React Tic Tac Toe My primary focus for this post is about hook setters being ...
2
votes
0answers
74 views

Repetitive Tic-Tac-Toe AI game with Python 3

I have a text based Tic-Tac-Toe game with a simple AI element that will take winning moves and block losing moves. The one piece of criticism I received was that I was 'hard coding' too much. I can ...
2
votes
0answers
69 views

Object Oriented Tic Tac Toe Python

I've been learning to code in my spare time for a couple of years. I have covered object oriented stuff before and can usually understand other people's object oriented code. This is the first time I'...
2
votes
0answers
237 views

Tic Tac Toe in Python 3

Learning to code with python this is what i came up with. But looking at the code i am sure there are ways to improve. I would really appreciate a constructive review and some guidelines. ...
2
votes
0answers
517 views

Two-player Tic-tac-toe game in React.js

I followed React Official Tutorial and before implementing time travel, I wanted to add a "New Game" button, and a LockBoard method that graphically prevents further inputs. Since I'm new to React, ...
2
votes
0answers
95 views

Tic Tac Toe game becomes more inefficient as time goes on

I designed a tic tac toe using 4 classes. The game class being the main class, the board class being the board, the player class being the decision making, and the AI class keeping the previous game ...
2
votes
0answers
936 views

Python Tic Tac Toe Gui and AI

So, I've tried to write a gui for Tic Tac Toe or noughts and crosses, as well as an AI opponent to play against. This is by far the longest program I've written, having mainly just done bash scripts ...
2
votes
0answers
1k views

TicTacToe in Python with MiniMax/AlphaBeta

I know barely anything about Python, I just jumped into this project as I've already coded it in different languages and it's my go-to when figuring things out in a new one, any feedback will be ...
2
votes
0answers
513 views

Tic Tac Toe AI - library based on Minimax algorithm

I recently struggled with implementing AI in Tic Tac Toe game. For better understanding of minimax algorithm I've decided to separate AI's logic. When I finished I thought that some may find it useful,...
2
votes
0answers
291 views

Final Java TicTacToe MVC Program

After my previous post, I decided to work on the project myself for a while (two weeks) to see how far I could get after reading a few of the really helpful answers to my previous posts. I read up on ...
2
votes
0answers
1k views

General Tic Tac Toe with Alpha-beta pruning in Java

I like toy AI and what can be better than starting from Tic Tac Toe. Basically, this is a command line program that asks the user to input the height of the game field, the width of the game field, ...
2
votes
0answers
521 views

Tic Tac Toe - NxN

This is a graphical Tic Tac Toe game by using SFML cross-platform library. It seems to work fine. I'm actually new to SFML and making GUIs. If anyone is familiar with SFML, I'd appreciate some ...
1
vote
0answers
42 views

Tic-Tac-Toe Game in Rust

I recently discovered to joys of rust programming and I have written a tic-tac-toe game. I was hoping for some feedback on how it is made. (The reason split and <...
1
vote
2answers
198 views

Tic Tac Toe Java Swing game

I just created a simple game. Now I'm thinking what could be done better here. I want to get some tips how to make the code better/easier or what to add to it. Code: ...
1
vote
0answers
65 views

Basic TicTacToe Game Number 1MillionAnd1

I put together a basic Tic Tac Toe game and would appreciate some feedback/advice on how to make it better. Specifically, the GUI is kinda awful. I would love to build more tests into this to test ...
0
votes
0answers
33 views

TicTacToe Board Check

I have written a code in C# that checks whether the user have won the TicTacToe game. I feel that maybe there is a more elegant way to check it, but I couldn't find one. Would like your help. ...
0
votes
0answers
771 views

Tic Tac Toe game in Python 3.X using tkinter GUI version 2

I am completely new to programming and to python and as my first self-learning project I am creating a simple Tic-Tac-Toe game. I have already posted a version of my code here on stack: Tic Tac Toe ...