Connecting Tech Pros Worldwide Help | Site Map

tic tac toe

  #1  
Old March 5th, 2009, 11:50 AM
Newbie
 
Join Date: Mar 2007
Posts: 29
im been googling around on how to programme the ai part for this game and alot mentioned about rotating the board... how do i rotate this board.
thnks
  #2  
Old March 5th, 2009, 12:16 PM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,487
Provided Answers: 9

re: tic tac toe


you mean like rotating 90/180/270 degrees?
180° invert the col and row numbers
90°/270° switch col/row numbers and invert col numbers
  #3  
Old March 5th, 2009, 12:18 PM
Newbie
 
Join Date: Mar 2007
Posts: 29

re: tic tac toe


oh yea switchin the values....meanin?


0 1 2
a
b
c

a b c
0
1
2
then ? if rotate again 012 will be at bottom same as beginin
  #4  
Old March 5th, 2009, 01:42 PM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,487
Provided Answers: 9

re: tic tac toe


let's assume your IDs are like in the thread: b00, b01, b02, b10, ...
Expand|Select|Wrap|Line Numbers
  1. 00 01 02           20 10 00
  2. 10 11 12  becomes  21 11 01
  3. 20 21 22           22 12 02
  #5  
Old March 5th, 2009, 02:03 PM
Newbie
 
Join Date: Mar 2007
Posts: 29

re: tic tac toe


so after tht the other two will be
Expand|Select|Wrap|Line Numbers
  1. 20 21 22
  2. 10 11 12
  3. 00 01 02
  4.  
  5.  
  6.  
  7. 00 10 20
  8. 01 11 21
  9. 02 12 22
  10.  
right?
  #6  
Old March 5th, 2009, 02:06 PM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,487
Provided Answers: 9

re: tic tac toe


very close, but both can not be reached by rotation alone.
  #7  
Old March 5th, 2009, 02:17 PM
Newbie
 
Join Date: Mar 2007
Posts: 29

re: tic tac toe


huh wht do you mean?
  #8  
Old March 5th, 2009, 02:40 PM
Dormilich's Avatar
Moderator
 
Join Date: Aug 2008
Location: Leipzig, Germany
Posts: 3,487
Provided Answers: 9

re: tic tac toe


make a sheet of paper, write down the IDs and turn it by 90°. you'll see, how the numbers will change places correctly.

background: symmetry operations
a plain square belongs to the Point Group D(4h) (which essentially tells you, what symmetry operations are possible). from that you can conclude, that there are 8 possibilities to switch the fields without losing the relative positioning (in the end you have a 4fold axis (rotation by 90°) making 4 positionings and the mirror images of these making a total of 8)
  #9  
Old March 5th, 2009, 03:08 PM
Newbie
 
Join Date: Mar 2007
Posts: 29

re: tic tac toe


hmhm i think i got it....will think abt it tmr (kinda late from where i'm at)
thanks alot! and for bein patience with my ques !! :D
Reply


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tic Tac Toe iam_clint insights 5 November 1st, 2007 05:33 PM
request for code : Py Tic Tac Toe in action Furman Smith answers 0 December 31st, 2006 02:05 PM
Tic Tac Toe Plus, Pre Alpha Version Mitoshima answers 2 December 27th, 2006 08:05 PM
Tic Tac Toe Plus Mitoshima answers 10 December 19th, 2006 02:05 AM
Writing code for a tic tac toe game in C++ harbintyler@hotmail.com answers 14 November 18th, 2006 03:55 PM