Docsity

API - Lecture Notes - Objects and Design | CS 2340, Exams of Computer Science

Toggle sidebar
bg1
API
Team /dev/random:-
Ahmed El-Helw
Abrar Ul Haque
Sheikh Zaib Talat
Stephen Gordon
In Milestone 6, the group had a great amount of discussion as to whether
or not a redesign was necessary or not. The arguments for redesign and
the reasons for not redesigning provide some insight into the new overall
API and its structure.
The arguments for redesign circled around two main points - first, there
were some things that were hacked up. For example, the WordMatcher dealt
with ambiguities in a particular way which caused certain problems with
certain styles of inputs. These were resolved by having functions to aid
the WordMatcher such that these problems were circumvented. Another
argument was the very large size of the AGObject class. Because of these
two reasons, many members of the group argued for a redesign.
However, the seemingly stronger and winning argument amongst the team was
not to redesign. The main reason was that though the current design
admittantly hacked around some bugs and did not always use the most
elegant solution, it proved to be very easy to expand [Milestone 5 took
one group member less than half an hour to implement and test], and
still maintained a very easy and understandable interface for the
pf2

Partial preview of the text

Download API - Lecture Notes - Objects and Design | CS 2340 and more Exams Computer Science in PDF only on Docsity!

API

Team /dev/random:- Ahmed El-Helw Abrar Ul Haque Sheikh Zaib Talat Stephen Gordon In Milestone 6, the group had a great amount of discussion as to whether or not a redesign was necessary or not. The arguments for redesign and the reasons for not redesigning provide some insight into the new overall API and its structure. The arguments for redesign circled around two main points - first, there were some things that were hacked up. For example, the WordMatcher dealt with ambiguities in a particular way which caused certain problems with certain styles of inputs. These were resolved by having functions to aid the WordMatcher such that these problems were circumvented. Another argument was the very large size of the AGObject class. Because of these two reasons, many members of the group argued for a redesign. However, the seemingly stronger and winning argument amongst the team was not to redesign. The main reason was that though the current design admittantly hacked around some bugs and did not always use the most elegant solution, it proved to be very easy to expand [Milestone 5 took one group member less than half an hour to implement and test], and still maintained a very easy and understandable interface for the

programmer to use in coding. As a result, there was no redesign. In implementing Wonderland, the total amount of code added was probably less than 100 lines. The reason was a question that went back and forth - the question of user versus system. The question basically implied that there was a very thin line between what the user [the user in this case is the game programmer] could and would want to do versus what the system would do by default. The best solution to this problem was to put the problem in context of the last Milestone, wherein we would be the users of our engines and we would have to write the game. Our group unanimously decided that we would like to have the maximum customizability possible for our program. As a result, we decided to take a similar approach to the one we took in the text based one - we would define some default actions [essentially take and drop], and would leave the programmer/user to define the rest of what happens. To communicate with the Wonderland, a method was added to AGWorld called world3dStart, which, whence called runs a 3d world. Essentially, all objects can query the world and find out what the wonderland is [and it gets nil if there is no wonderland]. This is also checked by other things, including the verb handling code. The easy method by which one can find out if a Wonderland exists thus makes it very easy to customize the game and make it very advanced. Therefore, though a redesign was not needed, the game engine is extremely easy to use and extremely powerful, such that our insane ideas for m7 can still be easily implemented in little time for the next phase.