Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
Log in  ::  Register  ::  Not logged in
Home       Members    Calendar    Who's On

Add to briefcase ««12

Tic Tac Toe TSQL Style Expand / Collapse
Posted Friday, April 1, 2011 6:57 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, April 2, 2015 8:39 AM
Points: 43, Visits: 501
Interesting concept - thanks. I liked the MindSweeper game that was posted also.

I'll have to review the logic of how the usp selects its position. I played four times and won all four times - you know that's not happening against a person!
Post #1087428
Posted Friday, April 1, 2011 8:29 AM



Group: General Forum Members
Last Login: Yesterday @ 5:33 AM
Points: 1,945, Visits: 3,497
The trick I remember for Tic-Tac-Toe was to use the 3x3 Magic Square:

2 9 4
7 5 3
6 1 8

The program then looks to add a cell that will bring a player's total to 15 then either block it for the oponent or take it for a win.

Books in Celko Series for Morgan-Kaufmann Publishing
Analytics and OLAP in SQL
Data and Databases: Concepts in Practice
Data, Measurements and Standards in SQL
SQL for Smarties
SQL Programming Style
SQL Puzzles and Answers
Thinking in Sets
Trees and Hierarchies in SQL
Post #1087503
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse