phases

2 views
Skip to first unread message

Jonathan Strawn

unread,
Apr 27, 2011, 5:11:48 PM4/27/11
to cs251-...@googlegroups.com
So I'm having a bit of confusion about how phases should work.

Should conveyors convey on every phase? Or just on certain phases?

This is how I thought it worked:

Phase 1: robots move
Phase 2: pushers push, express conveyors convey 1
Phase 3: express conveyors convey 1, conveyors convey 1, lasers pulse
Phase 4: pusher push again, lasers pulse
Phase 5: flags are tallied, repairs done, archives updated

new round, start over again at phase 1

With orders of priority within each phase to determine if a conveyor goes before a laser, etc.

-jon strawn

Joseph Collard

unread,
Apr 27, 2011, 5:16:29 PM4/27/11
to cs251-...@googlegroups.com
Jon,

All of those things should happen every phase. Well... almost all of
those things. There are certain pushers that may go off on just odd
phases or even phases. Or cards which cause special events during a
specific phase. In general, every thing should happen ever phase based
on the priority of the RallyEvent.

Joe

Derek Spaulding

unread,
Apr 27, 2011, 5:34:57 PM4/27/11
to cs251-...@googlegroups.com
Joe,
 
I'm having quite a bit of trouble figuring out how to make the ExpressConveyors move properly.  I have no idea where to start.  I know they need to move twice per phase.  I know they probably need to have seperate priority numbers for each movement.  Beyond that, I just don't know.
 
-Derek

Joseph Collard

unread,
Apr 27, 2011, 5:37:14 PM4/27/11
to cs251-...@googlegroups.com
Why not have a ConveyEvent class in Conveyor. The constructor for this class could take a priority int. During the getRallyEvents() method of ExpressConveyor, create two of these. One with priority n and the other with priority n+1. This will cause your conveyor to activate twice and convey your Robot. Make sure to use the "setConveyed" method in the Robot so you can make it rotate on the corners of your Conveyors.

Best of luck,

Joe

Derek Spaulding

unread,
Apr 27, 2011, 5:55:01 PM4/27/11
to cs251-...@googlegroups.com
Thanks Joe.  Creating a new constructor with a priority int cleared this up all by itself.  Craziness!

Sean Griffin

unread,
Apr 27, 2011, 6:29:09 PM4/27/11
to cs251-...@googlegroups.com
I'm having trouble getting Eclipse to download the changes you've made... Do you know how to do this?
--
Sean Griffin
505-850-9255
119 Dartmouth SE 87106

Sean Griffin

unread,
Apr 27, 2011, 6:29:26 PM4/27/11
to cs251-...@googlegroups.com
Whoops did not mean to send this to the group

Cody Thames

unread,
Apr 27, 2011, 7:42:37 PM4/27/11
to CS251-spr2011
i am having trouble with this same thing and i cannot figure it out. i
have Express Conveyor calling getRallyEvent in ConveyorTile and that
calls a ConveyEvent. when i do this it just seems to move 2 spaces at
once not move what is on the space 2 seperate times. any hints or help
would get great thanks.
> >         -jon strawn- Hide quoted text -
>
> - Show quoted text -

Joseph Collard

unread,
Apr 27, 2011, 7:53:47 PM4/27/11
to cs251-...@googlegroups.com
It sounds like you are creating two RallyEvents with the same priority
OR you are actually moving the Robot twice with 1 RallyEvent. Make sure
your RallyEvents are subsequent priorities and that they both convey a
Robot. This is especially nice for going around corners since you don't
actually have to calculate that you are going around a corner ahead of
time. Instead, you just move the Robot to the corner, then the corner
moves the Robot.

Does that help? If not, email me directly (not the group) with your SVN
url so I can take a look at your code.

Joe

Reply all
Reply to author
Forward
0 new messages