Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,200 members, 7,953,740 topics. Date: Friday, 20 September 2024 at 02:14 AM

Tic-tac-toe - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Tic-tac-toe (689 Views)

A Simple Tic-tac-toe Game Using Javafx / Html/css/javascript Tic-tac-toe Project / Tic Tac Toe Online Game With AI (2) (3) (4)

(1) (Reply) (Go Down)

Tic-tac-toe by Nobody: 12:28pm On Aug 20, 2015
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}

1 Like

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)

Need Help On This Issue / . / Get Your Website And Android Apps Develop Here

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 6
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.