Hello Everyone, I have completed my core
java course and needs to improve my coding and logical skills.. So as suggested by earlier in previous posts i am trying to build Tic-Tac-Toe game.
I am hoping you guys will help me to improve my skills as you all supported me earlier... To start the game i thought below requirement, please let me know what else is required :
requirement:
1 board having 3 rows and 3 columns , 2 players , 1 dot and 1 cross
rule:
1) players needs to wait for its turn till other player tick
2) continous row , column and diagonal entry of same type (dot or cross) is winner
3) if point 2 is not satisfied than match is draw
To check the winner i thought to compare each user entry with the possible position through which match can be won but that includes several if-else statements. Is there any alternative to improve? I also thought to make list of list which stores all the possible combination through which user can win and then compare the position with that but then i also thought it may also not work as for every input i need to compare all the entries...
Any idea how to move forward???