|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.moyoman.module.geometry.geometryimpl.ConnectExistingGroupsMoveGenerator
This class rates moves by how well they connect friendly groups. The rating is also affected by how many friendly groups are on the board.
| Constructor Summary | |
(package private) |
ConnectExistingGroupsMoveGenerator()
|
| Method Summary | |
private float |
evaluate(Stone st,
SingleLooseGroup slg1,
SingleLooseGroup slg2,
GeometryImpl geo)
Determine a rating for the given move in relation to the two loose groups. |
private double |
getDistance(Point pt,
SingleLooseGroup slg,
GeometryImpl geo)
Get the euclidean distance from the point to the loose group. |
private double |
getDistance(SingleLooseGroup slg1,
SingleLooseGroup slg2,
GeometryImpl geo)
Get the euclidean distance between two loose groups. |
RatedMove[] |
getMoves(Board b,
LooseGroups lg,
GeometryImpl geo,
GeometryMoveGenerator gmg)
Get the rated moves for connecting friendly groups. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
ConnectExistingGroupsMoveGenerator()
| Method Detail |
public RatedMove[] getMoves(Board b,
LooseGroups lg,
GeometryImpl geo,
GeometryMoveGenerator gmg)
getMoves in interface GeometryStrategyb - The Board module.lg - The LooseGroups module.geo - The GeometryImpl module.gmg - The GeometryMoveGenerator object.
private float evaluate(Stone st,
SingleLooseGroup slg1,
SingleLooseGroup slg2,
GeometryImpl geo)
st - The Stone in question.slg1 - One of the loose groups.slg2 - The other loose group.geo - The GeometryImpl module.
private double getDistance(Point pt,
SingleLooseGroup slg,
GeometryImpl geo)
pt - The point in question.slg - The loose group.geo - The GeometryImpl module.
private double getDistance(SingleLooseGroup slg1,
SingleLooseGroup slg2,
GeometryImpl geo)
slg1 - One of the loose groups.slg2 - The other loose group.geo - The GeometryImpl module.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||