If you think the Android project minecraft-connect-4 listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
Java Source Code
/* COPYRIGHT (C) 2014 Aleksandr Belkin. All Rights Reserved. */package sq.squ1rr.mcc4.ai;
/*fromwww.java2s.com*/import sq.squ1rr.mcc4.rules.Player;
/**
* Slightly modified easy AI, does the same thing for the opponent to
* determine if it is useful to block his combination.
* @author Aleksandr Belkin
*/publicclass NormalAi extends EasyAi {
/**
* Create and initialise AI
* @param grid
*/public NormalAi(int[][] grid) {
super(grid);
}
/*
* (non-Javadoc)
* @see ai.EasyAi#run()
*/
@Override
publicint run() {
return super.run();
}
/*
* (non-Javadoc)
* @see ai.EasyAi#analyse(int, int, int)
*/
@Override
protectedint analyse(int col, int row, int com) {
com = countCombinations(col, row, Player.PLAYER1);
return super.analyse(col, row, com);
}
}