Discussion forum > Suggestions

New protection system - Gonna try and code it

<< < (2/4) > >>

Chief149:
so you give me two coordinates meaning I must simply develope a "cube" of coordinates and print all of those coordinates out?


Alright. Well I am on my laptop which is a shitty pc for developement, but this is simple even to code on the laptop.



EDIT: This would normally take 15 to 20 minutes to code, but I'm gonna spice it up with a GUI, and at the same time I am out of town (hence the reason Im on my laptop instead of my gaming rig, and I am going to be visiting relatives and going to the lake tomorrow. In other words I might not have much of a chance to code until tomorrow afternoon when I get back from the lake. I know me giving you this delay can be suspicious, but I can guaruntee you I know how to code. It's just timing in this case.

cschurz:
no gui, please :| just a simple problem solving challenge to show that you can at least make a working program,

take your time, no excuses needed.

Chief149:
lol I already coded the gui. I didn't really put too much detail into it though.


Do you want to be able to put the xyz for points one and two onto a single line, or put the X, Y, and Z values for both coordinates in seperately?

cschurz:

--- Quote from: cschurz on August 04, 2012, 09:42:45 pm ---input:

--- Code: ---1 1 1 2 2 2

--- End code ---


--- End quote ---

Chief149:
Sorry about it taking so long. LOL big mistake by me, I spent an hour trying to figure out why in.split("\\s") wasn't properly splitting the input string "in" only to find out that the whole problem was because I was getting user input using scan.next(); instead of scan.nextLine();


Anyways here is the source file:
<temporarily redacted>

Tested it with a couple coordinates and I think it works. It gives the correct results for your sample coordinates, and it did with a couple tests I did so I think we're good.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version