All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class sp.SinglePointStrategy

java.lang.Object
   |
   +----sp.SinglePointStrategy

public final class SinglePointStrategy
extends Object
implements Strategy
The class SinglePointStrategy implements a PGMS strategy. The Single Point Strategy makes a decision based on information available from a single probed point in the mine map.

The strategy looks at a probed point. If the number of mines near the point equals the number of marks near the point, the strategy infers that near points whose status is unknown do not contain mines. Similarly, if the number of mines near the point equals the number of marks near the point plus the number of unknowns near, the strategy infers that the near points whose status is unknown contain mines.

The implementation makes extensive use of sets.

See Also:
Strategy, Set

Constructor Index

 o SinglePointStrategy()

Method Index

 o play(Map)
Invoke the Single Point Strategy.

Constructors

 o SinglePointStrategy
 public SinglePointStrategy()

Methods

 o play
 public void play(Map m)
Invoke the Single Point Strategy.

See Also:
Strategy

All Packages  Class Hierarchy  This Package  Previous  Next  Index