Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
How do I find the objects near me? Is there a piece of wall?
Old
cayhorstmann
Guest
 
Status:
Posts: n/a
Default How do I find the objects near me? Is there a piece of wall? - 09-21-2009, 09:03 AM

I am trying to translate a Karel exercise into an Alice3/Java world, and I need to have some way of testing for obstruction/looking for markers. Netbeans code completion gives me the names of methods that I might call, but unfortunately no javadoc, and it has been rather slow going trying to discover methods that way. Is that javadoc available somewhere?

Also, a really silly question. Is there a piece of wall in the gallery? I couldn't seem to find one. With Java, it is an easy matter to write a loop that places a bunch of pieces together, so I am much more interested in building blocks than a whole house or maze.

Thanks,

Cay
   
Reply With Quote
Old
cayhorstmann
Guest
 
Status:
Posts: n/a
Default 09-28-2009, 11:15 AM

I implemented a version of Karel in Alice 3, and it works great. See http://www.horstmann.com/sjsu/cs46a/lab6/ for the code. This is something that would have been incredibly tedious in Alice 2, but in Alice 3 with Netbeans, it is pretty straighforward once you figure out your quaternions :-)

No, students don't need to know anything about quaternions. They just use the robot just like they would with Karel. Why bother? 3D is prettier, and more importantly, I already use Alice and don't want to introduce yet another piece of software.

   
Reply With Quote
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 09-28-2009, 04:56 PM

What a great exercise for Alice 3.0!! Thanks for sharing.
   
Reply With Quote
Old
cayhorstmann
Guest
 
Status:
Posts: n/a
Default 09-29-2009, 12:55 AM

It really shows off one of the great strengths of programming Alice 3 in Java. With Alice 2, I would not have had the energy to make those maze walls. Or the toasters that mark the path of the drunkard :-)

I blogged about it on java.net: http://weblogs.java.net/blog/cayhors...nd-quaternions
   
Reply With Quote
Reply

Thread Tools
Display Modes

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 ©2018, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.