5shadesofr3d / Ruby-Board-Games

0 stars 0 forks source link

Victory check for connect4 #13

Open vppatel111 opened 5 years ago

vppatel111 commented 5 years ago

Also otto?

Also how extendable can we make this check? Some ideas: For both games we'll still need an algorithm for get all rows, columns and diagonals, the only difference is the specific comparison when we get n elements. I recommend searching up algorithms online, theres plenty done in C++.

rizwan146 commented 5 years ago

It seems like diagonals going upward seem to work for connect4 but diagonals going downward is not detected as a win