Jan-04-2018, 05:41 PM
Essentially, my idea was to check every possible vertical, horizontal and diagonal possibility on the board after a player has "placed" a counter. However, that seems inefficient.
I like your idea, and may try to adapt it, but I'd like to keep my board in strings.
I'll probably do a function with three other functions within it(horizontal win check, vertical.....), and each of those functions will use a nested for loop to detect if the counter that has just been placed, triggers a win.
I like your idea, and may try to adapt it, but I'd like to keep my board in strings.
I'll probably do a function with three other functions within it(horizontal win check, vertical.....), and each of those functions will use a nested for loop to detect if the counter that has just been placed, triggers a win.