I did it!!!! Finally, after working for a day while feeling very sick, I finally managed to do it.
I used a lot of libraries and StackOverflow post to understand what I was doing and needed to do. In fact I made a question in StackOverflow, and I’m amazed about the speed people answer over there, in less than 5 minutes one dude made me an explanation.
Even if I finished the work and it does what it needs to do, I’m still guessing that I’ve got a lot of things that can be optimized. If you find something, please do tell.
Update 1: I’ve already found some errors at the moment of analyzing the relations & and ^. They are fixed now
For the input I used the same txt that was used for the assignment description found here
I made this work alongside Arturo, at the end each of us made some methods different, nut the idea is the same basic. I have my class Arena where I can create the object and see the results, then I made the class MALYch where actually the magic gets done. First a for loop that calls the Lychren process for every number between the range.
Since I saw Arturo is promoting the use of “playground”, I would like to promote the use of Arena, where instances meet and fight the other object’s instances, and eventually the object itself, they can import some tools from foreign lands to create new weapons to fight their enemy.
Well, I’m guessing those Babylonians had a lot of free time if they discovered (or invented, depending how you see it) a method to find an approach to the exact square root of any number.
And now I implemented their wisdom to Java.
I guess its kind of easy, this time I used a lot of resources to comprehend what those Babylonians did a long time ago. At first I did it until the error was of 1% or less from the real root, then thanks to my friend Arturo I found an easier way.
Here it is the ol’ mighty Euclid’s Algorithm translated to Java. Not a really big thing, but I had some problems when translating it to a more Object Oriented way, because I made it in the regular way at first.
I’ve also tried using the BigIntigers class, but I had a problems when trying to use it, so at the end I did it manually, no cheating.
Here is my code, I already published it on my GitHub over here.
I made another version where I use Scanner to ask the user for an input to the number to compare with the object 84. I just have one problem in the line where I create the object: Eclipse is telling me that the object scan is never closed. I mean, its working and all, but I don’t understand the problem.
I’m doing a project with Santiago Kelley and Arturo Fornes, it will consist in a mod for Minecraft 1.8.9 named Coldcraft. The principal idea of this mod is to create a more difficult environment to Minecraft, where the temperature is a factor that would affect the stutus of the player. Like if you are in a cold biome, you should care about getting a coat before you get outside, or be around things that generate heat. It would work also for hot biomes. I also suggested to consider the altitude, if you get above a certain height you should start to getting cold.