From c87745f6f72d914fbddad511cae2847e5793fbd2 Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 24 Feb 2014 17:36:12 +0100 Subject: Add descriptions of methods --- report/progression.tex | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'report/progression.tex') diff --git a/report/progression.tex b/report/progression.tex index da5e34e..bb5a548 100644 --- a/report/progression.tex +++ b/report/progression.tex @@ -114,12 +114,37 @@ passed to any method in any class. \subsection{Game, GameEngine, UserInterface} +\subsubsection{Game} + +The constructor of this class instantiates the GameEngine and the UserInterface, +and set the output of the first to the second. + +\subsubsection{GameEngine} + +This class contains the attributes and methods previously contained in the Game +class. + +Instead of printing to the standard console output, it prints to the GUI. + +\subsubsection{UserInterface} + +This class implements the graphical user interface of the game. It basically +creates the different window components and provides methods to +interact with them. + \subsection{Parser/Scanner} -\subsection{UserInterface.addActionListener()} +Since commands are entered through a text field instead of the console, the +use of Scanner that read from the standard system input is not required anymore. + +\subsection{addActionListener() and actionPerformed()} -\subsection{UserInterface.actionPerformed()} +The addActionListener() of an object x takes as parameter an object y that have +a actionPerformed() method. When an action event occurs on x, this method on y +is called and an ActionEvent is passed as parameter. +The actionPerformed() method then does the appropriate action according to the +event that happened. \section{Zuul MVC} -- cgit v1.2.3 From 4ff3502c0f7a18a5344965c4a80ee7599e8939de Mon Sep 17 00:00:00 2001 From: Pacien TRAN-GIRARD Date: Mon, 24 Feb 2014 21:08:28 +0100 Subject: Update report --- report/progression.tex | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'report/progression.tex') diff --git a/report/progression.tex b/report/progression.tex index bb5a548..f015634 100644 --- a/report/progression.tex +++ b/report/progression.tex @@ -114,6 +114,8 @@ passed to any method in any class. \subsection{Game, GameEngine, UserInterface} +The following methods was implemented as part of commit 54e102463. + \subsubsection{Game} The constructor of this class instantiates the GameEngine and the UserInterface, @@ -146,6 +148,14 @@ is called and an ActionEvent is passed as parameter. The actionPerformed() method then does the appropriate action according to the event that happened. +\subsection{Add a button} + +A help button was added with commit 7f153a4c1. The processCommand() method was +modified to take the command String as parameter instead of reading it only from +the text field, and the actionPerformed() method was modified accordingly to +forward the command. + + \section{Zuul MVC} \subsection{Structure} -- cgit v1.2.3