|
Post by General Veers on Feb 6, 2010 19:34:03 GMT -5
Calculates the chances a faction has of winning a battle and then simulates the battle. Input number of armies, whether or not they are native to their land, and the values of their bonuses. It ouputs the probability of winning and the actual results. Attachments:
|
|
|
Post by vaconcovat on Feb 6, 2010 20:16:38 GMT -5
Awesome.
|
|
|
Post by dagamer on Feb 8, 2010 1:45:55 GMT -5
How would one like me go around making this PLAYABLE BAWWWWWWWW HOST IT ON RAPIDSHARE BAWWWWWWWWWWWWWWWWWWWWWWW. Just a friendly question.
|
|
|
Post by General Veers on Feb 8, 2010 16:22:39 GMT -5
It's already playable and publicly available here. Why would you need to go through the hassle of putting it on RapidShare?
|
|
|
Post by Qwerty on Feb 8, 2010 18:22:16 GMT -5
It's just fine where it is...
|
|
|
Post by dagamer on Feb 8, 2010 23:06:54 GMT -5
How do I play it? I only can do Python.
|
|
|
Post by General Veers on Feb 8, 2010 23:20:22 GMT -5
Download the file. Take note of the location where you save the file.
Open the command prompt.
Change your directory to the location of your saved file. Let's say you have Windows XP or Windows Vista and have the file saved in Documents. The following would be the command you use in the command prompt to change to that directory:
cd c:\users\YourAccountName\Documents
After changing directories, type in the following:
java WarSim
If anyone knows how to raise the level of abstraction (i.e. make it easier for laymen) for executing a class file on any computer that has Java, feel free to help me. For instance, making this so that a person merely has to double-click an icon on the desktop to run the file would raise the level of abstraction.
|
|
|
Post by dagamer on Feb 13, 2010 1:27:37 GMT -5
a .bat file?
|
|
|
Post by FoxtrotZero on Feb 16, 2010 9:57:26 GMT -5
General, the problem with that is .Bat files are run locally.
I can set it up so you only have to make the input once, if that would be good. Or at least I think I can...
|
|
|
Post by dagamer on Feb 22, 2010 21:01:04 GMT -5
... a .bat file can do what you can do in cmd console. just input @echo off cd C:\Path/to/teh/place/you/put/the/class/file/in/ java WarSim pause
|
|
|
Post by Qwerty on Feb 22, 2010 21:13:14 GMT -5
Or you can just do:
cd C:\Path/to/teh/place/you/put/the/class/file/in/ java WarSim
|
|
|
Post by FoxtrotZero on Feb 23, 2010 0:01:43 GMT -5
You clearly aren't listening to what I said.
The problem with that is the location being different for everyone. Therefore, a different code for everyone.
unless...
|
|
|
Post by Qwerty on Feb 23, 2010 10:04:25 GMT -5
Fox, you clearly didn't actually read the code.
cd C:\Path/to/teh/place/you/put/the/class/file/in/
Now, can't you see something a little funny about that line?
|
|
|
Post by General Veers on Feb 23, 2010 17:17:51 GMT -5
Unless what? What is your proposed solution?
|
|
PickleMan
Dedicated Member
{S=9}Head Programmer[M:98188]
Posts: 936
|
Post by PickleMan on Feb 25, 2010 17:14:38 GMT -5
dagamer: STFU Just listen to their arguments.
Saying "I only do python..." doesn't mean anything.
Quite frankly, neither does making that comment.
Is there a way to have a batch program look for where the file WarSim.class is saved, take that address, change to that directory, and then run the file?
|
|
|
Post by Qwerty on Feb 25, 2010 23:48:49 GMT -5
You could try that, but it would have to scan the entire computer.
|
|
|
Post by microfarad on Feb 26, 2010 0:27:01 GMT -5
Yo, stick this .bat in the folder with WarSim, works like a charm... Easy to use. Just click it and WarSim will pop up.
@echo off cd C:\vb set PathVar=%~dp0 cd %PathVar% java WarSim
|
|
|
Post by Qwerty on Feb 26, 2010 10:22:11 GMT -5
Ah, so it detects the folder?
|
|
|
Post by microfarad on Feb 26, 2010 18:18:58 GMT -5
Yep, finds it's folder. Changes the working directory to the path of that folder. Then javas WarSim...
|
|
PickleMan
Dedicated Member
{S=9}Head Programmer[M:98188]
Posts: 936
|
Post by PickleMan on Feb 26, 2010 22:54:44 GMT -5
Sorry if this is wrong (I switched to Linux a while ago) But would you really have to set the working directory?
|
|