Permalink
Browse files

Merged requirejs addition from master

  • Loading branch information...
2 parents 80616da + de16a17 commit f143bffe34fd04f0b204b2c38ae274c5651cb1c7 @bzar committed May 20, 2012
@@ -1,19 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="image_map.js"></script>
- <script type="text/javascript" src="theme.js"></script>
- <script type="text/javascript" src="map.js"></script>
- <script type="text/javascript" src="createGame.js"></script>
-
+ <script data-main="createGame" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Create a game</title>
</head>
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base", "image_map", "theme", "map"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
@@ -373,5 +374,5 @@ var wrap = function() {
});
}
-}();
+});
View
@@ -1,26 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/d3/d3.js"></script>
- <script type="text/javascript" src="/aja/lib/aja.js"></script>
- <script type="text/javascript" src="vec2d.js"></script>
-
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
-
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="image_map.js"></script>
- <script type="text/javascript" src="animatedMap.js"></script>
- <script type="text/javascript" src="theme.js"></script>
- <script type="text/javascript" src="game.js"></script>
- <script type="text/javascript" src="gamelogic.js"></script>
- <script type="text/javascript" src="ticker.js"></script>
-
+ <script data-main="game" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Game</title>
</head>
View
@@ -1,7 +1,5 @@
-var gameClient = null;
-var gameMap = null;
-
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base", "image_map", "theme", "map", "d3/d3", "gamelogic.js", "ticker.js"], function() {
var client = new GameNodeClient(Skeleton);
gameClient = client;
var session = null;
@@ -15,6 +13,8 @@ var wrap = function() {
var oldUnits = {};
var powerMap = null;
var finished = false;
+ var gameClient = null;
+ var gameMap = null;
var gameUIState = {
stateName: "select"
@@ -972,4 +972,4 @@ var wrap = function() {
}
return powerMap;
}
-}();
+});
@@ -1,18 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/d3/d3.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="theme.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="gameStatistics.js"></script>
-
+ <script data-main="gameStatistics" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Game statistics</title>
</head>
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base", "theme", "d3/d3"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
var theme = null;
@@ -185,5 +186,5 @@ var wrap = function() {
}
};
}
-}();
+});
View
@@ -1,16 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="home.js"></script>
-
+ <script data-main="home" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Home</title>
</head>
View
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
@@ -63,5 +64,5 @@ var wrap = function() {
}
});
}
-}();
+});
View
@@ -1,18 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="image_map.js"></script>
- <script type="text/javascript" src="theme.js"></script>
- <script type="text/javascript" src="info.js"></script>
-
+ <script data-main="info" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Info</title>
</head>
View
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base", "image_map", "theme"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
var theme = null;
@@ -248,4 +249,4 @@ var wrap = function() {
});
}
-}();
+});
View
@@ -1,16 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="join.js"></script>
-
+ <script data-main="join" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Open games</title>
</head>
View
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
@@ -95,4 +96,4 @@ var wrap = function() {
}
});
}
-}();
+});
View
@@ -1,13 +1,6 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="login.js"></script>
-
+ <script data-main="login" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
<title>Wars - Login</title>
View
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings"], function() {
var client = new GameNodeClient();
var session = new Session(client);
@@ -32,5 +33,5 @@ var wrap = function() {
client.connect(WARS_CLIENT_SETTINGS.gameServer);
});
-}();
+});
View
@@ -1,16 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="manual.js"></script>
-
+ <script data-main="manual" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Manual</title>
</head>
@@ -40,10 +31,12 @@
<h4>Turn actions</h4>
<p>On your turn you can move your units and build more of them. </p>
<p>Units can be built by clicking a base you own. This opens the "Build" menu. The build menu shows the available units and their prices. You can not build units that cost more than you have funds. You can move the units you build on your next turn.</p>
- <p>You can move a unit you own by clicking on it. This changes the game view to highlight the tiles that unit can move to. You can move to a highlighted tile by clicking on it, or cancel moving the unit by clicking on a tile that is not highlighted. It is possible and sometimes smart to "move in place", or remain at the current location by clicking on the tile with the unit a second time. This allows you to skip moving the unit and just perform an action. Movement range is determined by surrounding terrain and the unit's type. For example a heavy tank can only move one space per turn in a forest, because it costs four movement points to move a HeavyVehicle in a forest, and the heavy tank only has four movement points. On the other hand a scout can move three tiles in a forest, because it has the movement type "LightVehicle" and six movement points. LightVehicle movement type only has a cost of two movement points per tile in a forest, which gives us: <span class="formula">6 movement points / 2 (movement points / tile) = 3 tiles</span>.</p>
+ <p>You can move a unit you own by clicking on it. This changes the game view to highlight the tiles that unit can move to. You can move to a highlighted tile by clicking on it, or cancel moving the unit by clicking on a tile that is not highlighted. It is possible and sometimes smart to "move in place", or remain at the current location by clicking on the tile with the unit a second time. This allows you to skip moving the unit and just perform an action. Movement range is determined by surrounding terrain and the unit's type. For example a heavy tank can only move one space per turn in a forest, because it costs four movement points to move a HeavyVehicle in a forest, and the heavy tank only has four movement points. On the other hand a scout can move three tiles in a forest, because it has the movement type "LightVehicle" and six movement points. LightVehicle movement type only has a cost of two movement points per tile in a forest, which gives us: <span class="formula">6 movement points / 2 (
+movement points / tile) = 3 tiles</span>.</p>
<p>When you move to a tile, you are presented with one or more of the following options: attack, deploy, undeploy, load, unload, capture, wait and cancel. "Wait" instructs the unit to move to the specified location and stay there until the next turn. Selecting attack displays available targets with a red highlight. This means your unit can attack another unit after moving. Clicking on one of the highlighted units engages the two units in a battle. Battle mechanics are explained in the next section. "Deploy" and "undeploy" are special commands for units that have weapons which require deploying. These kind of weapons can only be fired when the unit is deployed. Deployed units are surrounded with a white rectangle and cannot move. "Load" and "unload" are used with carrier units, like APCs, transport copters and cargo ships. Using carrier units is explained below. "Capture" makes your unit attempt to capture the property in the tile it moves to.</p>
<p>Each tile has 200 capture points. If the tile can be captured, this number can be decreased by capturing. This reduces the number of capture points by the number of health points the capturing unit has. After a tile's capture points reach zero, the player that owns the capturing unit assumes ownership of the tile and the tile's capture points reset to 1. If an owned tile has less than 200 capture points in the beginning of the turn of its owner and is not currently being captured by another player's unit it receives 50 capture points. A tile can have a maximum of 200 capture points. If a tile has less than 200 capture points, the relative amount is displayed as a bar in the left side of the tile. The bar is red if the tile is being captured and light blue if it is regenerating capture points.</p>
- <p>Carrier units can transport other units from one place to another. Transportable units are determined by class. For example, an APC can transport two infantry units, but a cargo ship has room for two infantry units or vehicles. Units can be loaded to carriers by moving them to the same tile and selecting the "load" action. Loaded units are shown as small filled square symbols in the lower left corner of the unit. Several units can be loaded into a single carrier in one turn, provided the carrier has room for them. Unloading a unit from a loaded carrier is accomplished by moving the carrier normally and selecting the "unload" action. A list of units available for unloading are displayed. After selecting a unit to unload possible unload tiles are highlighted. Selecting a tile unloads the unit. Note that you can only load units on terrain that the unit can move on, and unload units only from and to such terrain. For example you can't load a tank to a cargo ship when the cargo ship is in a water tile, or unload artillery to a mountain. Warning: if the carrier unit is destroyed, all units it carries are destroyed as well. Guard them well.</p>
+ <p>Carrier units can transport other units from one place to another. Transportable units are determined by class. For example, an APC can transport two infantry units, but a cargo ship has room for two infantry units or vehicles. Units can be loaded to carriers by moving them to the same tile and selecting the "load" action. Loaded units are shown as small filled square symbols in the lower left corner of the unit. Several units can be loaded into a single carrier in one turn, provided the carrier has room for them. Unloading a unit from a loaded carrier is accomplished by moving the carrier normally and selecting the "unload" action. A list of units available for unloading are displayed. After selecting a unit to unload possible unload tiles are highlighted. Selecting a tile unloads the unit. Note that you can only load units on terrain that the unit can move on, and unload units only from and to such terrain. For example you can't load a tank to a cargo ship when the cargo ship is in a water tile,
+or unload artillery to a mountain. Warning: if the carrier unit is destroyed, all units it carries are destroyed as well. Guard them well.</p>
<p>When you want to end your turn, click on "End turn". Clicking on "Surrender" destroys all your units, disowns all your properties and ends your turn, effectively making you lose immediately.</p>
<h4>Battle mechanics</h4>
View
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
@@ -8,5 +9,5 @@ var wrap = function() {
populateNavigation(session);
});
});
-}();
+});
View
@@ -1,19 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="image_map.js"></script>
- <script type="text/javascript" src="theme.js"></script>
- <script type="text/javascript" src="map.js"></script>
- <script type="text/javascript" src="mapEditor.js"></script>
-
+ <script data-main="mapEditor" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - Map editor</title>
</head>
View
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base", "image_map", "theme", "map"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
@@ -525,5 +526,5 @@ var wrap = function() {
e.preventDefault();
});
}
-}();
+});
View
@@ -1,19 +1,7 @@
<html>
<head>
- <script type="text/javascript" src="settings.js"></script>
- <script type="text/javascript" src="jquery-1.6.2.min.js"></script>
- <script type="text/javascript" src="/socket.io/socket.io.js"></script>
- <script type="text/javascript" src="/gamenode/gameNodeClient.js"></script>
- <script type="text/javascript" src="/gamenode/session.js"></script>
- <script type="text/javascript" src="skeleton.js"></script>
- <script type="text/javascript" src="base.js"></script>
- <script type="text/javascript" src="theme.js"></script>
- <script type="text/javascript" src="image_map.js"></script>
- <script type="text/javascript" src="map.js"></script>
- <script type="text/javascript" src="myMaps.js"></script>
-
+ <script data-main="myMaps" src="require.js"></script>
<link rel="stylesheet" href="wars.css" type="text/css"/>
-
<title>Wars - My maps</title>
</head>
View
@@ -1,4 +1,5 @@
-var wrap = function() {
+require(["jquery-1.6.2.min.js", "/socket.io/socket.io.js", "/gamenode/gameNodeClient.js", "/gamenode/session.js",
+ "skeleton", "settings", "base", "image_map", "theme", "map"], function() {
var client = new GameNodeClient(Skeleton);
var session = null;
@@ -181,5 +182,5 @@ var wrap = function() {
filterMaps(maps);
});
}
-}();
+});
Oops, something went wrong.

0 comments on commit f143bff

Please sign in to comment.