forked from ThePrakharRajpali/TechnoMainsMultiplayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
42 lines (36 loc) · 1.25 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const express = require("express");
const app = express();
const Board = require('./Models/Board.js');
const Bomb = require('./Models/bomb.js');
const Captain = require('./Models/captain.js');
const Colonel = require('./Models/colonel.js');
const Flag = require('./Models/flag.js');
const General = require('./Models/general.js');
const Lieutenant = require('./Models/lieutenant.js');
const Major = require('./Models/major.js');
const Marshal = require('./Models/marshal.js');
const Miner = require('./Models/miner.js');
const Piece = require('./Models/Piece.js');
const Player = require('./Models/player.js');
const Scout = require('./Models/scout.js');
const Sergeant = require('./Models/sergeant.js');
const Spy = require('./Models/spy.js');
const Square = require('./Models/Square.js');
//alert("Connected");
var newBoard = new Board;
newBoard.setupGame();
var tableAppend = "<table>";
for(var i = 0; i<12; i++){
tableAppend += "<tr>";
for(var j = 0; j<10; j++){
tableAppend += "<td> </td>";
}
tableAppend += "</tr>";
}
tableAppend += "</table>";
app.get("/", (req, res) => {
res.send(tableAppend);
});
app.listen(3000, () => {
console.log("Server running");
});