{"id":217633,"date":"2018-09-15T22:58:59","date_gmt":"2018-09-15T22:58:59","guid":{"rendered":"http:\/\/localhost\/wordpress\/index.php\/2018\/09\/15\/gsp-125-week-7-ilab-gsp-124-week-7-ilab-win32game\/"},"modified":"2018-10-24T08:49:38","modified_gmt":"2018-10-24T08:49:38","slug":"gsp-125-week-7-ilab-gsp-124-week-7-ilab-win32game","status":"publish","type":"post","link":"https:\/\/www.benedictsol.com\/blogs\/gsp-125-week-7-ilab-gsp-124-week-7-ilab-win32game\/","title":{"rendered":"GSP 125 Week 7 iLab GSP 124 Week 7 iLab win32game"},"content":{"rendered":"<p>GSP 125 GSP\/125 GSP 125 \u00a0Week 7 iLab\t\u00a0\tLooking for help with C++ lab, please see attached zip, inside main.cpp are directions:\t\/\/ 1) Replace Vector2 and Coordinate\t\/\/ a) Create a new Vec2 class as a replacement for both Vector2 and\t\/\/ Coordinate. Vec2 must be a templated class, so that it stores and\t\/\/ manipulates X and Y values of a templated type. It may be helpful to\t\/\/ start with the Vector2 class, add &#8220;template&#8221; to the\t\/\/ header, and replace (Ctrl+H) each instance of &#8220;float&#8221; with &#8220;TYPE&#8221;, and\t\/\/ &#8220;Vector2&#8221; with &#8220;Vec2&#8221;.\t\/\/ b) Remember, a templated class must have all method definitions in the\t\/\/ same file as the templated class declaration. Also remember that method\t\/\/ definitions outside of a templated class&#8217; declaration need a\u00a0\t\/\/ &#8220;template&#8221; header, and a &#8220;&#8221; appended to the class\t\/\/ name with the scope resolution operator (e.g.:\u00a0\t\/\/ &#8220;void Vec2::limitMagnitude(TYPE max) {\/* method body *\/}&#8221;).\t\/\/ c) Replace the use of Vector2 with Vec2.\t\/\/ d) Replace the use of Coordinate with Vec2.\t\/\/ 2) More Game Goals\t\/\/ a) Instead of having a single goal for the player, create at least 3\t\/\/ randomly placed goals for the player. Use a &#8220;std::vector&#8221;\u00a0\t\/\/ object (from the Standard Template Library) named &#8220;goals&#8221; to store the\t\/\/ goals.\t\/\/ c) Whenever the user clicks in the game window, the game should create\t\/\/ another goal object for the player to get, and add it to the\t\/\/ &#8220;std::vector goals&#8221; object.\t\/\/ d) Each retrieved goal should be removed from the game after being\t\/\/ retrieved by the player. A &#8220;You Win!&#8221; message should display when the\t\/\/ player retrieves all goals.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>GSP 125 GSP\/125 GSP 125 \u00a0Week 7 iLab \u00a0 Looking for help with C++ lab, please see attached zip, inside main.cpp are directions: \/\/ 1) Replace Vector2 and Coordinate \/\/ a) Create a new Vec2 class as a replacement for <a href=\"https:\/\/www.benedictsol.com\/blogs\/gsp-125-week-7-ilab-gsp-124-week-7-ilab-win32game\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-217633","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/217633","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/comments?post=217633"}],"version-history":[{"count":0,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/posts\/217633\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/media?parent=217633"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/categories?post=217633"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.benedictsol.com\/blogs\/wp-json\/wp\/v2\/tags?post=217633"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}