Class Move

java.lang.Object
  extended byMove

public class Move
extends java.lang.Object

This class defines a Move - a list of LetterMoves. Multiple LetterMoves make up a Move. The method findWords is used extensively by the computer player, but also by the human player for move validation at the end of a turn.

Version:
2.0
Author:
3GP01 - Hardev Bhamra, Deepak Chandarana, James Tompkin
See Also:
LetterMove, Word

Constructor Summary
Move(Player pl)
           
Move(Player pl, int scre, java.util.List moves)
           
Move(Player pl, java.util.List moves)
           
Move(Player pl, Word wd, Board b)
           
 
Method Summary
 void addLetterMove(LetterMove lm)
           
 void clearWords()
           
 boolean findWords(Board b)
           
 java.util.List getLetterMoves()
           
 java.util.List getLetters()
           
 int getScore(Board b)
           
 java.util.List getWords()
           
 boolean inDictionary()
           
 void setScore(int x)
           
 java.lang.String toString()
           
 java.lang.String toXml()
           
 boolean validateMove(int numb)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Move

public Move(Player pl)

Move

public Move(Player pl,
            java.util.List moves)

Move

public Move(Player pl,
            int scre,
            java.util.List moves)

Move

public Move(Player pl,
            Word wd,
            Board b)
Method Detail

clearWords

public void clearWords()

addLetterMove

public void addLetterMove(LetterMove lm)

setScore

public void setScore(int x)

getLetterMoves

public java.util.List getLetterMoves()

getWords

public java.util.List getWords()

getLetters

public java.util.List getLetters()

validateMove

public boolean validateMove(int numb)

inDictionary

public boolean inDictionary()

findWords

public boolean findWords(Board b)

getScore

public int getScore(Board b)

toString

public java.lang.String toString()

toXml

public java.lang.String toXml()