This solution is outdated. To rescore this solution, sign in.
-
2 Comments
Cseppento Bence
on 17 Sep 2016
I don't get why I fail all tests, it works perfectly in my MATLAB.
yurenchu
on 21 Mar 2017
You need (something similar to) your switch/case procedure not just for the diagonals but for the rows and columns as well; otherwise you're assigning the wrong value to wins(k) (in line 6 and line 10).
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!