cs015.Othello
Class DefaultWeights

java.lang.Object
  extended bycs015.Othello.BoardWeights
      extended bycs015.Othello.DefaultWeights

public class DefaultWeights
extends BoardWeights

This class represents default board weights for Othello. Remember that these are not necessarily the best possible board weights.


Constructor Summary
DefaultWeights()
           
 
Method Summary
 int getWeight(int x, int y)
          This returns the weight at the space indicated by the parameters.
 void setWeight(int weight, int x, int y)
          This allows you to edit the weights of individual spaces.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWeights

public DefaultWeights()
Method Detail

getWeight

public final int getWeight(int x,
                           int y)
Description copied from class: BoardWeights
This returns the weight at the space indicated by the parameters. Valid values of the parameters are 0-9. This assumes that you have border squares and gives weights to these squares also. Therefore the top left real square in the game is at position 1, 1.

Specified by:
getWeight in class BoardWeights

setWeight

public void setWeight(int weight,
                      int x,
                      int y)
This allows you to edit the weights of individual spaces. You do not need to use this for Othello.