₦airaland Forum

Welcome, Guest: RegisterLoginWith GoogleTrendingRecentNew

Stats: 3,330,563 members, 8,446,054 topics. Date: Thursday, 16 July 2026 at 01:41 AM

Toggle theme

Tic-tac-toe - Programming - Nairaland

Nairaland ForumScience/TechnologyProgrammingTic-tac-toe (744 Views)

1 Reply (Go Down)

Tic-tac-toe by Nobody:
I need an algorithm for tic-tac-toe.

Using JavaScript.
Re: Tic-tac-toe by Nobody: 12:54pm On Aug 20, 2015

\documentclass[ 11pt , a4paper ]{ article }
% Pretty typography
\usepackage{ microtype }
\title {How to identify if OP is a faggøt }
\author { Karmanaut}
\date {\today }
\begin {document }
\maketitle
\begin {abstract }
We identify the multiple different variables that can be
measured to determine if OP is a faggøt .
\end { abstract}
Re: Tic-tac-toe by DonSegmond(m): 2:04pm On Aug 20, 2015
Teempakguy:
I need an algorithm for tic-tac-toe.

Using JavaScript.

game_over = false
while not game_over:
player1.move
if is_game_over?
game_over = true
else:
player2.move
if is_game_over?
game_over = true

function is_game_over?:
if match_diagonal or match_vertical or match_horizontal:
return true
else:
return false


function move:
do
get move_location
if move_location.has_no_piece_on_it:
valid_move = true
until valid_move


That's the general idea.
Re: Tic-tac-toe by Nobody: 7:51pm On Aug 20, 2015
1 Reply

A Simple Tic-tac-toe Game Using JavafxHtml/css/javascript Tic-tac-toe ProjectTic Tac Toe Online Game With AI234

.5 Reasons To Integrate Social Media Within Your Mobile App StrategyULTIMATE SEO OPTIMIZER For Magento 2