|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectPrinter
public class Printer
| Constructor Summary | |
|---|---|
Printer()
|
|
| Method Summary | |
|---|---|
void |
getNextMove()
This method handles the input of new moves for the text-based program. |
void |
makeMove()
Keeps inputting moves from console, until it is given a valid move, in which case the move is performed |
void |
printAll()
Prints state of Freecell board |
void |
printCard(Card c)
Prints card c, by first converting it into a string |
void |
printCellHeader()
Prints header for cells |
void |
printCells()
Prints cards contained in cells |
void |
printEmpty()
Prints empty spot (with no card) |
void |
printEnd()
Prints end of game message |
void |
printEndl()
Prints an endline |
void |
printFoundations()
Prints highest cards in Foundations |
void |
printFoundHeader()
Prints header for Foundations |
void |
printMoveQuery()
Asks user to input where he wants to move cards from/to |
void |
printNumOfCardsQuery()
Asks user how many cards he wishes to move |
void |
printPlayAgainQuery()
Asks user if he/she wants to play again |
void |
printSeparator()
Prints a separator |
void |
printShorterTabSep()
Prints a shorter tab separator (after a 10* card) |
void |
printTableauHeader()
Prints header for tableaus |
void |
printTabSep()
Prints a tab separator |
void |
printTitle()
prints the title of the game |
void |
setFreecell(Freecell f)
This method associated the printer object with a freecell game f. |
void |
showError()
Prints error message when invalid move is entered |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Printer()
| Method Detail |
|---|
public void setFreecell(Freecell f)
setFreecell in interface IViewf - the freecell object to be linked to this viewpublic void printAll()
printAll in interface IViewpublic void printFoundHeader()
public void printFoundations()
public void printCellHeader()
public void printCells()
public void printTableauHeader()
public void printCard(Card c)
public void printTitle()
IView
printTitle in interface IViewpublic void printMoveQuery()
public void printNumOfCardsQuery()
public void printEnd()
IView
printEnd in interface IViewpublic void printPlayAgainQuery()
IView
printPlayAgainQuery in interface IViewpublic void printSeparator()
public void printTabSep()
public void printShorterTabSep()
public void printEndl()
public void printEmpty()
public void showError()
showError in interface IViewpublic void makeMove()
makeMove in interface IViewpublic void getNextMove()
getNextMove in interface IView
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||