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
Author
Message
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: Wednesday, July 16, 2014 5:16 PM
Points: 42, Visits: 417
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


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 11:55 AM
Points: 1,945, Visits: 2,860
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