Author Topic: I made a trade-route game (fixed again lol)  (Read 547 times)

So I made a trade-route generator a few weeks ago. I finally got around to turning it into a game. See how many routes you can go on before you run out of rations/money!

http://jsfiddle.net/McZealot/8y937wxb/embedded/result/ < -- Game

http://jsfiddle.net/McZealot/8y937wxb/ < -- Sourcecode

It's done in Javascript, JQuery, CSS, and HTML.
« Last Edit: January 21, 2015, 09:49:58 PM by McZealot »


"Unable to resolve the server's DNS address"

Code: [Select]
if (route3.length >= 100 && route3.length <= 200) {
        route3.payoff = Math.floor(route3.payoff * 1.1);
    } else {}
    if (route3.length >= 200 && route3.length <= 300) {
        route3.payoff = Math.floor(route3.payoff * 1.15);
    } else {}
    if (route3.length >= 300 && route3.length <= 400) {
        route3.payoff = Math.floor(route3.payoff * 1.2);
    } else {}
    if (route3.length >= 400 && route3.length <= 500) {
        route3.payoff = Math.floor(route3.payoff * 1.25);
    } else {}
    if (route3.length >= 500 && route3.length <= 600) {
        route3.payoff = Math.floor(route3.payoff * 1.30);
    } else {}
    if (route3.length >= 600 && route3.length <= 700) {
        route3.payoff = Math.floor(route3.payoff * 1.35);
    } else {}
    if (route3.length >= 700 && route3.length <= 800) {
        route3.payoff = Math.floor(route3.payoff * 1.4);
    } else {}

love the ifelse formatting, but why didn't you use any arrays?

or does ajax even have arrays

y'know, like this:

Code: [Select]
const int PLUS = 5;
int[] cookie = new int[PLUS];

or does ajax even have arrays
There's no AJAX here. There isn't any server-side code in Zealot's stuff at all.

There's no AJAX here. There isn't any server-side code in Zealot's stuff at all.

what language is it then?

/edit

nvm
« Last Edit: January 21, 2015, 09:49:43 PM by SetGaming »

So I made a trade-route generator a few weeks ago. I finally got around to turning it into a game. See how many routes you can go on before you run out of rations/money!

http://jsfiddle.net/McZealot/8y937wxb/embedded/result/ < -- Game

http://jsfiddle.net/McZealot/8y937wxb/ < -- Sourcecode

It's done in Javascript, JQuery, CSS, and HTML.
ftfy

what language is it then?
It's done in Javascript, JQuery, CSS, and HTML.
a good technique when seeking answers is to read the entire op

what language is it then?
JavaScript...
AJAX stands for "asynchronous JavaScript and XML."

a good technique when seeking answers is to read the entire op

did that, sorry