Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Results tagged with tic-tac-toe
Search options answers only
not deleted
user 71574
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.
4
votes
Accepted
Callback-oriented Tic-Tac-Toe
Take game logic out of main
I don't like the while loop for processing, however I find making move recursive (next calls the agent which calls move which calls next and so on) rather confusing. It …
3
votes
Checking for a win in Tic Tac Toe
public boolean hasWon(Seed theSeed) {
What is a Seed? The way that you are using it, I'd expect a Player object.
for (int col = 0; col < COLS; ++col) { //check columns
…
2
votes
Tic Tac Toe game AI in C++
Optimal strategy
One of the comments on this answer points to http://xkcd.com/832/ which gives the complete optimal strategy for Tic-Tac_Toe.
This is not to say that it wouldn't be a good programm …
3
votes
Accepted
Tic Tac Toe against Al
Untested
I haven't tried these changes, as your code is not runnable without more context. If you'd provided the other classes, I could have run them and seen what happened. Then I could make chang …
4
votes
Tic-Tac-Toe machine learning
public class run{
It's more common to give classes capitalized noun names. So Runner rather run. But in this case, I'd tend to call it something like TicTacToe or TicTacToeGame. Although perhap …
5
votes
Tic Tac Toe in Android
Favor enum values over magic values
int c[][];
This holds the board and the numbers represent state. Consider
Status board[][];
where
public enum Status {
X,
O
}
Then c …
2
votes
Basic TicTacToe game in java
import java.util.*;
It is generally considered to be better to write out separate imports rather than use the * operator.
ArrayList<Integer> choicesMade = new ArrayList<Integer>();
…
13
votes
Accepted
Ncurses Tic Tac Toe with simplistic AI
Avoid numbered variables
char space_1 = ' ';
char space_2 = ' ';
char space_3 = ' ';
char space_4 = ' ';
char space_5 = ' ';
char space_6 = ' ';
char space_7 = ' ';
char space_8 = ' ';
char space_9 …
5
votes
Accepted
Tic Tac Towards FX
Don't make classes into implicit objects
static boolean turnTracker;
I don't think that this should be a static variable on TicTacToeSquare. It would make more sense for this to be a method …