This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
theoriginalbit's profile picture

Testing Turtle Scripts in CC-Emu (kinda)

Started by theoriginalbit, 22 March 2013 - 04:35 AM
theoriginalbit #1
Posted 22 March 2013 - 05:35 AM
Ok so this was inspired by the large amount of people lately in the 'Ask a Pro' section with turtle programs.

I'm a very lazy person, I always have cc-emu open and when these people come along I never want to open up, or don't have the battery to open, Minecraft to do the standard code testing and such. So I wrote this to add to cc-emu, to kinda test turtle programs.

At the moment everything is based on random-ness, but at least it will give an idea of how well the script handles different conditions, like *a wild block appears from somewhere that I had already cleared* :P … I was considering making it a little better at some point where the returns are a little bit more realistic, but again, I'm lazy, so I didn't for now. Maybe I will do it in the future when I get bored or am procrastinating from my University AI assignment again.

How To Use (CC-Emu)
  1. After you turn on a computer
  2. Run this program ( IMPORTANT: do not call or run it from your code! Just run it from the terminal)
How To Use (Minecraft)
  1. Don't…

Make sure that you run this program before running the script you are testing the first time the computer has been turned on or it will not be in _G

Anyways here is the code… Turtle API

Feel free to do what ever you wish with it, modify it, make it better, release the better version, I don't mind. Just link this topic and we cool! :)
Edited on 31 March 2013 - 11:39 AM
superaxander #2
Posted 22 March 2013 - 06:57 PM
That comes in hand!
theoriginalbit #3
Posted 22 March 2013 - 07:04 PM
That comes in hand!
Indeed :)/>
bjornir90 #4
Posted 22 March 2013 - 07:08 PM
What does it ? It simulate a turtle and we can see it moving or it just printt what the turtle does ?
theoriginalbit #5
Posted 22 March 2013 - 07:28 PM
What does it ? It simulate a turtle and we can see it moving or it just printt what the turtle does ?
neither, it is and will aim to emulate what a turtle does… to help you do basic tests…
Qunatomy #6
Posted 31 March 2013 - 11:47 AM
how do you test with it the programs?
a little bit more info would be awesome =)
what do i do with that code you just gave me in this thread?
theoriginalbit #7
Posted 31 March 2013 - 01:37 PM
how do you test with it the programs?
a little bit more info would be awesome =)
what do i do with that code you just gave me in this thread?
Make sure that you run this program before running the script you are testing the first time the computer has been turned on or it will not be in _G
But I'll add more info now.