28 Topics

Member Avatar for
Member Avatar for Hoofy

I am having trouble figuring out an efficient way to perform the checks for how a winner is determined in a 3D tic tac toe program (that is 3x3x3). Winners can be three spaces in any vertical, horizontal, or diagonal, including those between the 3 "boards." There are over 50 …

Member Avatar for Jamie_9
0
1K
Member Avatar for aditya369

Hello all, please help me in writing a tic-tac-toe python program which actually learns as it plays with the user. So, starting as a dumb opponent, the program should be able to learn from the games being played against the user and evolve as a clever opponent it plays along... …

0
164
Member Avatar for nathan.pavlovsky

Hello programmers! I am working on a Tic-Tac-Toe player vs. computer class, which is supposed to have a `run.()` method in order for the game to start. In a `gameWon()` member function, I am checking for a win, either by the player or by the computer. I check to see …

Member Avatar for Moschops
0
501
Member Avatar for schroaus

I REALLY need some help. I ahve been writing a tic-tac-toe console application program in delphi. I had most of the logic finished for the program when I made a mistake. At the beginning of a class period the program was working fine, at the end of the class it …

Member Avatar for Schol-R-LEA
0
2K
Member Avatar for Seth Lam

Hello, I have been researching the minimax algorithm for a few days, but I can't apply it properly. I have read that for the 8 lines in Tic Tac Toe, you give certain scores. However, I don't understand what they are trying to tell me. Could I have a simple …

Member Avatar for Adak
0
1K
Member Avatar for Seth Lam

I posted a question about algorithms for Tic Tac Toe's invincible AI (that never loses, only wins or ties), and found a scoring method. Here is the code I came up with. As of this moment it takes the next available space, so the scoring appears not to be working. …

0
421
Member Avatar for faysal.ishtiaq_1

/* ############ Project Name : TIC TAC TOE ############ CODED BY ############ > Faysal Ishtiaq Rabby ############ ~ Student ID : 120909 ############ Khulna University, Bangladesh. */ #include "stdafx.h" #include<stdlib.h> int main() /* Declaring Variables */ char gamestart; char pos_input[]={'1','2','3','4','5','6','7','8','9'}; int gameloop, option_position,input,flag=0,player_number,rand_int,i; /* Variable Declaration Finished*/ printf("Press \"ENTER\" to …

Member Avatar for Unimportant
-1
370
Member Avatar for skiboy209

I thought i would share this with the community wrote most of it in school but the ai i wrote at home enjoy!

Member Avatar for PalashBansal96
2
249
Member Avatar for candicecandy

I am a beginner in C++ programming and I badly need help. I just need some tips for programming a tic tac toe game that asks the user how many times they want to play, and should track how many times they win. Also, this program should not use arrays. …

Member Avatar for Schol-R-LEA
0
222
Member Avatar for jay.zyzz

**Tic-Tac-Toe without a class** Write a modular program that allows two players to play a game of tic–tac-toe. Use a two-dimensional char array with 3 rows and 3 columns as the game board. Each element of the array should be initialized with an asterisk(*). The program should display the intial …

Member Avatar for jay.zyzz
0
9K
Member Avatar for fasna

In the pencil-and-paper game, Tic-tac-toe, 2 players take turns to mark 'X' and 'O' on a board of 3x3 squares. The player who succeeds in marking 3 successive 'X' or 'O' in vertical, horizontal or diagonal stripe wins the game. Write a function that determines the outcome of a tic-tac-toe …

Member Avatar for Gribouillis
0
332
Member Avatar for HTMLperson5

Hi, everyone. I am making a tic - tac - toe game and I am having some trouble. As you can see I have made good progress: from os import system a = "1"; b = "2"; c = "3"; d = "4"; e = "5"; f = "6"; g …

Member Avatar for TrustyTony
0
278
Member Avatar for jone1734

I am having trouble with writing a tic tac toe program. My code executes just fine if the first move results in a win. If it doesn't the code just stops. It doesn't finish but it does not continue to run. Can someone help? Must start with the game board …

Member Avatar for Labdabeta
0
195
Member Avatar for Labdabeta

I have an alpha beta interface and have implemented a tic tac toe class from it. For some reason my AI tends to occasionally make stupid moves (such as making a fork rather than blocking a 2 in a row) I was wondering if anybody can see where I went …

Member Avatar for Labdabeta
0
1K
Member Avatar for pwolf

I have the task of writing a function to determine the outcome of a game of tictactoe, i at first thought use a couple of for loops but that proved pointless, and then the only way i could think of was to write an if...elif...else statement for each row, column …

Member Avatar for woooee
0
302
Member Avatar for jankeifer

can anybody help me making this program? i've based my game from this site. [url]http://www.education.com/activity/article/Tick_tack_toe_Added/[/url] hope that someone can help me.. i've been stuck coding that for almost 6hrs but still no progress. thank you!

Member Avatar for jankeifer
0
335
Member Avatar for Eragah

Hi! Im a beginner in programming, and I have been given an assignment to program a TicTacToe game. I could not find any programs as such for reference over the Interwebs thus would want the expertise of daniweb users to help. The problem im having: 1. How do i transfer …

Member Avatar for NormR1
0
258
Member Avatar for minghags

Hello! I wanna ask you guys for help with this program. Here is my problem explanation: I want that user gives an input in the beginning of the program how big should tictactoe board would be. For example: input: 4 so board would be 4x4. Code of the current problem …

Member Avatar for WaltP
0
1K
Member Avatar for lovelyrockrchic

I'm trying to make a Tic Tac Toe game for my Java class. I am not able to use JButtons only JPanels. I'm stuck on the part where my program determines if there are 3 x's or o's in a row. [CODE] public void winner() { if(3 = tictactoe[0].turn + …

Member Avatar for hiddepolen
0
262
Member Avatar for mrjillberth

[CODE] package semBreak; import java.io.*; public class YLingaw { public static void main (String [] args) throws IOException { BufferedReader jill = new BufferedReader (new InputStreamReader (System.in)); char[][] board = { {' ','1','2','3',' '}, {'1',' ',' ',' ','1'}, {'2',' ',' ',' ','2'}, {'3',' ',' ',' ','3'}, {' ','1','2','3',' '}}; YLingaw.ehem(board); …

Member Avatar for JamesCherrill
0
153
Member Avatar for josh327

Hey guys I'm trying to create a tic-tac-toe program in c++. This is what I have so far. But it just produces garbage. [CODE]#include<iostream> #include<cstdlib> #include<ctime> #define frz system("PAUSE") using namespace std; //Global Variables const int length = 3; const int width = 3; //Function Prototypes void initializeboard(char [length][width], int); …

Member Avatar for VernonDozier
0
247
Member Avatar for happyhappyhappy

Hey guys, I am interested into making a 3D tic tac toe game, but right now I am stuck. I created a 3D string... like board[3][3][3]. and each time the user type in numbers between 0 to 2...and the computer does the same too. I played a few 3dTTT game …

Member Avatar for Salem
0
148
Member Avatar for TrustyTony

Here version of TicTacToe demo [URL="http://www.daniweb.com/software-development/python/threads/357974/1526474#post1526474"]code by wooeee[/URL] with packing style, which is more familiar for me. Also fixed indents and made it run also with Python 3.

Member Avatar for e-papa
0
744
Member Avatar for MrHardRock

Hey everyone I need to write a tic tac toe program vs the computer using an array. I have gotten almost all of it done but I am totally stuck on this error. Any help would be much appreciated, thanks in advance. My error being on line 221 and 222 …

Member Avatar for audiomatic
0
222
Member Avatar for Bschober

I've been working on a side project of Tic Tac Toe, it works fine, but I'd like to change the winner function to be dynamic and work for any size board. For example, say I want a 4x3 or a 10x10 board how could I make the one function work …

Member Avatar for Bschober
0
347
Member Avatar for manofhouse

The program runs but only switches the player once [CODE]#include <iostream> #include <string> #include <cmath> #include <ctime> #include <cstdlib> using namespace std; class TicTacToe{ public: TicTacToe(void);//constructor void playOneGame(void);//member function void switchPlayer(char &);//member function void showBoard(void);// member function void postMove(int, int, char);// member function char determineWinner(void);// member function private: char Board[3][3]; …

Member Avatar for macobex
0
138
Member Avatar for azzman

This is what I have so far. This is a two player game. I need to make it a one player game (player vs. computer). I am also trying to make the computer smart.. for example, if there is an open corner, then it should take that spot. Basically, the …

Member Avatar for griswolf
0
441
Member Avatar for kvass

Hey guys~! I am working on a code and I am having some difficulties with it -- Basically I have a 3x3 grid of JButtons that represent the squares on a TicTacToe grid. The code seems to run fine but then after it determines a victor it crashes and says …

Member Avatar for BestJewSinceJC
0
464

The End.