• + 2 comments

    I drowed a table 15x15 starting from 0,0 to 14,14. It represents what player1 does. It looks like this :

    W -> win ; L -> lose
    
    "LLWWLLWWLLWWLLW",
    "LLWWLLWWLLWWLLW",
    "WWWWWWWWWWWWWWW",
    "WWWWWWWWWWWWWWW",
    "LLWWLLWWLLWWLLW",
    "LLWWLLWWLLWWLLW",
    "WWWWWWWWWWWWWWW",
    "WWWWWWWWWWWWWWW",
    "LLWWLLWWLLWWLLW",
    "LLWWLLWWLLWWLLW",
    "WWWWWWWWWWWWWWW",
    "WWWWWWWWWWWWWWW",
    "LLWWLLWWLLWWLLW",
    "LLWWLLWWLLWWLLW",
    "WWWWWWWWWWWWWWW", ;
    
    you should drow it by walking on its diagonals like that : 0,0 -> 0,1 -> 1,0 -> 0,2 -> 1,1 -> 2,0 -> ... till end. i hardcodated it becouse i was lasy to implement it. i solve it like a DP problem :D