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 for tictactoe
Search options not deleted
2
votes
2
answers
841
views
Another TicTacToe Implementation
There are already many other TicTacToe implementations but most of them are missing some features like if duplicate input is entered exception and immediate termination of the program occurs board is not … also posted in github https://github.com/VISWESWARAN1998/TicTacToe- …
4
votes
1
answer
997
views
TicTacToe game in Haskell
As a beginner, I tried to implement TicTacToe in Haskell. How can I improve my code? … :: Int -> (a -> a) -> [a] -> [a]
nth _ _ [] = []
nth 0 f (x:xs) = f x : xs
nth n f (x:xs) = x : nth (n - 1) f xs
TicTacToe
module TicTacToe where
import Data.List (transpose)
import Data.Foldable …
2
votes
1
answer
321
views
General TicTacToe in Haskell
I decided to take a more general approach while implementing the TicTacToe game in Haskell. … module TicTacToe where
import Data.List (transpose)
import Data.Foldable (asum)
import Data.List.Utils (surround, nth)
data Tile = O | X | Empty deriving (Eq)
instance Show Tile where
show Empty …
2
votes
1
answer
199
views
A simple TicTacToe
A simple game of TicTacToe.
Please review for style and other.
Is this a proper ViewModel? … schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:TicTacToe3"
mc:Ignorable="d"
Title="TicTacToe …
4
votes
2
answers
111
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. … end
end
end
board = Board.new
board.game
Repl it repo : https://replit.com/@Burakkepuc/TicTacToe#main.rb …
2
votes
1
answer
2k
views
TicTacToe in Java
I created this game in Java:
import java.util.Scanner;
public class TicTacToe {
public static Scanner input = new Scanner(System.in);
public static String getName(int noPlayer) {
System.out.print … nextPlayer = O;
}
}
conclusion(gameResult(board), O, X);
}
}
Which, as I think you can probably guess, is meant to replicate the classic pen and paper game TicTacToe …
4
votes
1
answer
1k
views
2 Player TicTacToe Game
I am a beginner Java programmer and I have just finished creating a simple 2 player TicTacToe game and would appreciate some feedback/advice on how to make it better. … .*;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
public class TicTacToe implements ActionListener {
public static int turnNum;
public static JLabel title;
public static JButton …
5
votes
2
answers
412
views
Developed TicTacToe game
I chose to do TicTacToe game. At this point I added some menu, playing with bot, bigger map. This is my first bigger OOP project, so I'm the most curious ,if I did it correctly. … Code is anable in my github: https://github.com/NeverGiveUPek/TicTacToe
I will also copy it below:
public class Game {
public static void main(String[] args) {
Play game1 = new Play();
game1. …
3
votes
1
answer
145
views
Beginner TicTacToe
To test the current stuff I wrote this basic TicTacToe - and would like to know what could be better. …
3
votes
1
answer
198
views
Improvements, TicTacToe in Scala
I've just started my journey into functional programming and tried to implement a TicTacToe game Recursively without State in Scala. … import javax.swing.JOptionPane
import scala.annotation.tailrec
class TicTacToe {
}
object TicTacToe {
val l1: List[Int] = List(0, 1, 2)
val l2: List[Int] = List(3, 4, 5)
val l3: List[Int] = List …
2
votes
2
answers
481
views
TicTacToe in OOP
I'm trying to learn some OOP programming using Java, so I've created TicTacToe. Could you give me some advice on how I can improve this code? …
1
vote
1
answer
110
views
TicTacToe in C++ (Gandalf vs Saruman)
#include <iostream>
#include <stdio.h>
using namespace std;
class Tictactoe {
public:
// Constructor and Destructor
Tictactoe();
~Tictactoe();
// Functions
int placeToken(int, int … user
int pos[2] = {0,0};
// for the gamePlay loop
bool gameOver = false;
};
Tictactoe::Tictactoe() {};
Tictactoe::~Tictactoe() {};
// Function to place user token on given position
int Tictactoe …
3
votes
2
answers
276
views
TicTacToe in Python 3
This is code for a TicTacToe game. Can you please suggest any improvements?
pos_matrix=[[' ',' ',' '],[' ',' ',' '],[' ',' ',' ']]
def my_tictactoe(pos,symbol):
if pos_matrix[pos[0]-1][pos[1]-1]! …
2
votes
1
answer
33
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. … false
}
}
main.kt
import main.com.github.me.tictactoe.Board
import main.com.github.me.tictactoe.Turns
import main.com.github.me.tictactoe.WinningConditions
fun main() {
println("Welcome to TicTacToe …
0
votes
2
answers
274
views
Stateful implementation of TicTacToe
ticTacToe;
private Scanner scanner;
private State state;
private Player winner;
public TicTacToeStateManager(TicTacToe ticTacToe, Scanner scanner) {
this.ticTacToe = ticTacToe … (Scanner scanner) {
grid = new int[9];
new TicTacToeStateManager(this, scanner);
}
public static void main(String[] args) {
TicTacToe ticTacToe = new TicTacToe(new Scanner …