tic tac toe 
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
| 
March 5th, 2009, 12:16 PM
|  | 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
| 
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
| 
March 5th, 2009, 01:42 PM
|  | 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, ... - 00 01 02 20 10 00
-
10 11 12 becomes 21 11 01
-
20 21 22 22 12 02
| 
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 -
20 21 22
-
10 11 12
-
00 01 02
-
-
-
-
00 10 20
-
01 11 21
-
02 12 22
-
right?
| 
March 5th, 2009, 02:06 PM
|  | 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.
| 
March 5th, 2009, 02:17 PM
| | Newbie | | Join Date: Mar 2007
Posts: 29
| | | re: tic tac toe
huh wht do you mean?
| 
March 5th, 2009, 02:40 PM
|  | 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)
| 
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
|  | | | | /bytes/about
We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights.
Get the best answers to your questions from over 225,662 network members.
|