Alice Community  

Go Back   Alice Community > General Discussion > The Lounge

Reply
 
Thread Tools Display Modes
ITSE1429 Lab4-RE
Old
relliott44444
Junior Member
 
Status: Offline
Posts: 11
Join Date: Sep 2014
Default ITSE1429 Lab4-RE - 11-24-2014, 12:43 AM

re: ITSE1429 Lab4-RE

LAB 4 Observations

My Lab4 solution was heavily dependent on design decisions of Lab 3 with the addition of logic supporting arrays for the objects. I also used the setting of torus' visibility property and speed values.

It is key to use arrays for torus, home, and ground objects. An array also holds speed values. Like Lab3, my main loop depends on the catch counter. The need to vary the torus display necessitated use of a separate 'iteration' counter. Also, the arrays use a separate index.

Some major logic additions were necessary. Within the main loop I use a large if/else, and based on iteration value, it controls how many torus are 'un-cloaked' and in play. Within this are nested sub-loops utilizing an index for array 'nth' items.

The code is actually more straight-forward than done for Lab3.

A journey begins by making torus(s) visible, setting speed(s), and proceeding to move the item(s) down to ground(s). For example 'move torus(1) to ground(1), duration speed(1). Next is 'catch' determination. Importantly, functions do the cone distance checking, one for each torus. They are boolean and when evaluating true, a 'catch' is registered. The block within the if/else concludes by sending back the torus(s) to the home array item(s).

The if/else is critical. In the first block (early iteration values), there is one torus in play, going to one ground, with one speed value, one function call, and one return home.

In the middle block of the if/else (mid-range iterations), two torus' are included but the preceeding construct is the same.

Eventually the last block of the if/else brings in all torus' and related objects at once.

Similar to Lab3, cone operation is independent of the torus'.
I found it best to use functions to check cone distance. As mentioned, I invoke one, some or all of them after torus(s) arrival on ground, (before returning them home).

The play seems satisfactory. When the cone is correctly in position, it does result in a catch but there is also no gain from arriving too late. The cone can be stationary and if parked in the right position, catches can be racked up.

Richard
   
Reply With Quote
lab 3
Old
dukonye
Junior Member
 
Status: Offline
Posts: 5
Join Date: Jul 2014
Location: dallas, tx
Default lab 3 - 12-09-2014, 01:40 AM

hello richard, how are you? please i need help on how to do lab 3 to 4, i am done with everything just stock with this two labs , please can you help me?
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.