Class ScrabbleData

java.lang.Object
  extended by ScrabbleData

public class ScrabbleData
extends java.lang.Object


Constructor Summary
ScrabbleData(ScrabbleView sView)
           
 
Method Summary
 Scrabble parseScrabbleData(java.lang.String[] lines)
          Parses the Array returned from readFromFile(..)
 java.lang.String[] readFromFile(java.lang.String fileName)
          Reads from a file
 void writeToFile(Scrabble scrabble, java.lang.String fileName)
          Writes the Scrabble info to a file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScrabbleData

public ScrabbleData(ScrabbleView sView)
Method Detail

writeToFile

public void writeToFile(Scrabble scrabble,
                        java.lang.String fileName)
Writes the Scrabble info to a file

Parameters:
Scrabble - The Scrabble class holding all the information about the game (Bag/Board/Players/Moves)
fileName - The file name to write all the data to

readFromFile

public java.lang.String[] readFromFile(java.lang.String fileName)
Reads from a file

Parameters:
fileName - The name of the file
Returns:
Returns the contents of the file in a String array

parseScrabbleData

public Scrabble parseScrabbleData(java.lang.String[] lines)
Parses the Array returned from readFromFile(..)

Parameters:
lines - the lines from the line
Returns:
Scrabble returns a Scrabble object with all the data