private int PrimaryWinMove(int playerID, GameMatrix gm) { for (int iii = 1; iii < 10; iii++) { if (gm.MoveLegal(iii)) { if (gm.MoveWinner(iii, playerID) == playerID) { return(iii); } } } return(0); }
private int PrimaryBlockMove(int playerID, GameMatrix gm) { int nextPlayer; if (playerID == 3) { nextPlayer = 1; } else { nextPlayer = playerID + 1; } for (int iii = 1; iii < 10; iii++) { if (gm.MoveLegal(iii)) { if (gm.MoveWinner(iii, nextPlayer) == nextPlayer) { return(iii); } } } return(0); }