Search

Friday, November 16, 2012

Day 99: Writing code on blogger

It is hard to post code on blogger, until now I just made some HTML tricks, so I was needing to do something else.

I am trying now BlogTrog, let's try with getGroup method:

/** * Gets all the groups by a color * @param board The board where the game is played * @param color The color that wants to be analyzed. */ public void getGroups(Board board,int color){ Ruleset ruleset=new Ruleset(); ArrayList<Integer> group; ArrayList<Integer> liberties; //Console console=new Console(); for(int i=0;i<board.getMainBoard().size();i++){ if(board.getMove(i)==color){ group=ruleset.getGroup(i, board); liberties=ruleset.getLiberties(group, board); } } }
Wow, it is good. Let's keep it for now.
BlogTrog website

No comments:

Post a Comment