"Othello" game needs some clarification [closed]
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this questionI am trying to see if my understanding of "othello" fame is correct or not. According to the rules, we flip the dark/light sides if we get some sequence like X000X => XXXXX. The question I have is if in the process of flipping 0->X or X-> 0, do we also need to consider the rows/columns/diagonals of newly flipped elements? e.g. consider board state as shown in above image(New element X is placed @ 2,3)
When we update board, we mark elements from 2,3 to 6,3 as Xs but in this process elements like horizontal 4,3 to 4,5 and diagonal 2,3 to 4,5 are also eligible for update? so do we update those elements as well? or just the elements which have starting as 2,3 (i.e update rows/column/diagonal whose starting point is the element we are dealing with, in our case 2,3?)
Please help me understand it
No. Newly flipped pieces are not considered recursively.
No, this would unbalance the game significantly. Some friends and I actually tried playing like this a long time ago. The game turned out to be barely playable. It was less a matter of strategy and more a matter of luck and who happened to go first, reach a side first, etc.
In any given turn, tiles are flipped only outward from the piece which was placed during that turn.
(Note also in the example board in your question, O has seriously given up the game to X. He has no chance at this point :)
精彩评论