Ajout du fonctionement basique

This commit is contained in:
SamuWrob 2020-12-17 12:29:24 +01:00
parent eed359a457
commit 9e007cae96
33 changed files with 9348 additions and 15 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"id":"style.css","dependencies":[{"name":"_css_loader","parent":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/public/style.css","resolved":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/node_modules/parcel/src/builtins/css-loader.js"},{"name":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/package.json","includedInParent":true,"mtime":1608198051272}],"generated":{"css":"body {\n margin: 0;\n padding: 0;\n\n}\n\n.tableContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40rem;\n}\n\ntable {\n border: 2px solid;\n\n}\n\ntr {\n\n border: 1px solid;\n}\n\ntd {\n border: 1px solid;\n height: 10px;\n width: 20px;\n}\n\ntd[data-color=\"red\"] {\n background: red\n}\n\ntd[data-color=\"yellow\"] {\n background: yellow\n}\n","js":"var reloadCSS = require('_css_loader');\n\nmodule.hot.dispose(reloadCSS);\nmodule.hot.accept(reloadCSS);"},"sourceMaps":{"css":{"mappings":[{"source":"style.css","original":{"line":1,"column":0},"generated":{"line":1,"column":0}},{"source":"style.css","original":{"line":2,"column":0},"generated":{"line":2,"column":0}},{"source":"style.css","original":{"line":3,"column":0},"generated":{"line":3,"column":0}},{"source":"style.css","original":{"line":4,"column":0},"generated":{"line":4,"column":0}},{"source":"style.css","original":{"line":5,"column":0},"generated":{"line":5,"column":0}},{"source":"style.css","original":{"line":6,"column":0},"generated":{"line":6,"column":0}},{"source":"style.css","original":{"line":7,"column":0},"generated":{"line":7,"column":0}},{"source":"style.css","original":{"line":8,"column":0},"generated":{"line":8,"column":0}},{"source":"style.css","original":{"line":9,"column":0},"generated":{"line":9,"column":0}},{"source":"style.css","original":{"line":10,"column":0},"generated":{"line":10,"column":0}},{"source":"style.css","original":{"line":11,"column":0},"generated":{"line":11,"column":0}},{"source":"style.css","original":{"line":12,"column":0},"generated":{"line":12,"column":0}},{"source":"style.css","original":{"line":13,"column":0},"generated":{"line":13,"column":0}},{"source":"style.css","original":{"line":14,"column":0},"generated":{"line":14,"column":0}},{"source":"style.css","original":{"line":15,"column":0},"generated":{"line":15,"column":0}},{"source":"style.css","original":{"line":16,"column":0},"generated":{"line":16,"column":0}},{"source":"style.css","original":{"line":17,"column":0},"generated":{"line":17,"column":0}},{"source":"style.css","original":{"line":18,"column":0},"generated":{"line":18,"column":0}},{"source":"style.css","original":{"line":19,"column":0},"generated":{"line":19,"column":0}},{"source":"style.css","original":{"line":20,"column":0},"generated":{"line":20,"column":0}},{"source":"style.css","original":{"line":21,"column":0},"generated":{"line":21,"column":0}},{"source":"style.css","original":{"line":22,"column":0},"generated":{"line":22,"column":0}},{"source":"style.css","original":{"line":23,"column":0},"generated":{"line":23,"column":0}},{"source":"style.css","original":{"line":24,"column":0},"generated":{"line":24,"column":0}},{"source":"style.css","original":{"line":25,"column":0},"generated":{"line":25,"column":0}},{"source":"style.css","original":{"line":26,"column":0},"generated":{"line":26,"column":0}},{"source":"style.css","original":{"line":27,"column":0},"generated":{"line":27,"column":0}},{"source":"style.css","original":{"line":28,"column":0},"generated":{"line":28,"column":0}},{"source":"style.css","original":{"line":29,"column":0},"generated":{"line":29,"column":0}},{"source":"style.css","original":{"line":30,"column":0},"generated":{"line":30,"column":0}},{"source":"style.css","original":{"line":31,"column":0},"generated":{"line":31,"column":0}},{"source":"style.css","original":{"line":32,"column":0},"generated":{"line":32,"column":0}},{"source":"style.css","original":{"line":33,"column":0},"generated":{"line":33,"column":0}},{"source":"style.css","original":{"line":34,"column":0},"generated":{"line":34,"column":0}},{"source":"style.css","original":{"line":35,"column":0},"generated":{"line":35,"column":0}},{"source":"style.css","original":{"line":36,"column":0},"generated":{"line":36,"column":0}},{"source":"style.css","original":{"line":37,"column":0},"generated":{"line":37,"column":0}}],"sources":{"style.css":"body {\n margin: 0;\n padding: 0;\n\n}\n\n.tableContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40rem;\n}\n\ntable {\n border: 2px solid;\n\n}\n\ntr {\n\n border: 1px solid;\n}\n\ntd {\n border: 1px solid;\n height: 10px;\n width: 20px;\n}\n\ntd[data-color=\"red\"] {\n background: red\n}\n\ntd[data-color=\"yellow\"] {\n background: yellow\n}\n"},"lineCount":37}},"error":null,"hash":"ffb4b66b9774256a5deb0b784b7a26a2","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"id":"../node_modules/@dzeio/dom-manager/dist/index.js","dependencies":[{"name":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/package.json","includedInParent":true,"mtime":1608198051272},{"name":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/node_modules/@dzeio/dom-manager/package.json","includedInParent":true,"mtime":1608197056582},{"name":"./DOMElement","loc":{"line":7,"column":45},"parent":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/node_modules/@dzeio/dom-manager/dist/index.js","resolved":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/node_modules/@dzeio/dom-manager/dist/DOMElement.js"},{"name":"./DOMFleetManager","loc":{"line":9,"column":50},"parent":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/node_modules/@dzeio/dom-manager/dist/index.js","resolved":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/node_modules/@dzeio/dom-manager/dist/DOMFleetManager.js"}],"generated":{"js":"\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DOMFleetManager = exports.DOMElement = void 0;\nconst DOMElement_1 = __importDefault(require(\"./DOMElement\"));\nexports.DOMElement = DOMElement_1.default;\nconst DOMFleetManager_1 = __importDefault(require(\"./DOMFleetManager\"));\nexports.DOMFleetManager = DOMFleetManager_1.default;\n"},"sourceMaps":{"js":{"mappings":[{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":1,"column":0},"generated":{"line":1,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":2,"column":0},"generated":{"line":2,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":3,"column":0},"generated":{"line":3,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":4,"column":0},"generated":{"line":4,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":5,"column":0},"generated":{"line":5,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":6,"column":0},"generated":{"line":6,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":7,"column":0},"generated":{"line":7,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":8,"column":0},"generated":{"line":8,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":9,"column":0},"generated":{"line":9,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":10,"column":0},"generated":{"line":10,"column":0}},{"source":"../node_modules/@dzeio/dom-manager/dist/index.js","original":{"line":11,"column":0},"generated":{"line":11,"column":0}}],"sources":{"../node_modules/@dzeio/dom-manager/dist/index.js":"\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.DOMFleetManager = exports.DOMElement = void 0;\nconst DOMElement_1 = __importDefault(require(\"./DOMElement\"));\nexports.DOMElement = DOMElement_1.default;\nconst DOMFleetManager_1 = __importDefault(require(\"./DOMFleetManager\"));\nexports.DOMFleetManager = DOMFleetManager_1.default;\n"},"lineCount":11}},"error":null,"hash":"2382ab187504905a26d3a1fa0e392eaa","cacheData":{"env":{}}}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
{"id":"index.html","dependencies":[{"name":"./main.ts","dynamic":true,"resolved":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/public/main.ts","parent":"/home/ubuntu/Bureau/cours/2eme année/contest/Puissance4/public/index.html"}],"generated":{"html":"<!DOCTYPE html>\n<html lang=\"fr\">\n\n\t<head>\n\t\t<meta charset=\"UTF-8\">\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\t\t<title>Puissance 4</title>\n\t</head>\n\n\t<body>\n\t\t<div class=\"tableContainer\">\n\t\t\t<table>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>1</td>\n\t\t\t\t\t<td>1</td>\n\t\t\t\t\t<td>1</td>\n\t\t\t\t\t<td>1</td>\n\t\t\t\t\t<td>1</td>\n\t\t\t\t\t<td>1</td>\n\t\t\t\t\t<td>1</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>2</td>\n\t\t\t\t\t<td>2</td>\n\t\t\t\t\t<td>2</td>\n\t\t\t\t\t<td>2</td>\n\t\t\t\t\t<td>2</td>\n\t\t\t\t\t<td>2</td>\n\t\t\t\t\t<td>2</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>3</td>\n\t\t\t\t\t<td>3</td>\n\t\t\t\t\t<td>3</td>\n\t\t\t\t\t<td>3</td>\n\t\t\t\t\t<td>3</td>\n\t\t\t\t\t<td>3</td>\n\t\t\t\t\t<td>3</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>4</td>\n\t\t\t\t\t<td>4</td>\n\t\t\t\t\t<td>4</td>\n\t\t\t\t\t<td>4</td>\n\t\t\t\t\t<td>4</td>\n\t\t\t\t\t<td>4</td>\n\t\t\t\t\t<td>4</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>5</td>\n\t\t\t\t\t<td>5</td>\n\t\t\t\t\t<td>5</td>\n\t\t\t\t\t<td>5</td>\n\t\t\t\t\t<td>5</td>\n\t\t\t\t\t<td>5</td>\n\t\t\t\t\t<td>5</td>\n\t\t\t\t</tr>\n\t\t\t\t<tr>\n\t\t\t\t\t<td>6</td>\n\t\t\t\t\t<td>6</td>\n\t\t\t\t\t<td>6</td>\n\t\t\t\t\t<td>6</td>\n\t\t\t\t\t<td>6</td>\n\t\t\t\t\t<td>6</td>\n\t\t\t\t\t<td>6</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t</div>\n\t</body>\n\t<script src=\"/6427dc610ec40c788cba04a9c39d6dcf.js\"></script>\n\n</html>\n"},"sourceMaps":null,"error":null,"hash":"51cadd649cefd22980e5240f1be43281","cacheData":{}}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

12
.editorconfig Normal file
View File

@ -0,0 +1,12 @@
# EditorConfig is awesome: https://EditorConfig.org
# top-most EditorConfig file
root = true
[*]
indent_style = tab
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

26
dist/front.3abc0af9.css vendored Normal file
View File

@ -0,0 +1,26 @@
body{
margin: 0;
padding:0;
}
.tableContainer{
display:flex;
align-items: center;
justify-content: center;
height: 40rem;
}
table{
border: 2px solid;
}
tr{
border: 1px solid;
} td{
border: 1px solid;
height:10px;
width: 20px;
}
/*# sourceMappingURL=/front.3abc0af9.css.map */

1
dist/front.3abc0af9.css.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["style.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"front.3abc0af9.css","sourceRoot":"../public","sourcesContent":["body{\n\tmargin: 0;\n\tpadding:0;\n\n}\n.tableContainer{\n\tdisplay:flex;\n\talign-items: center;\n\tjustify-content: center;\n\theight: 40rem;\n}\ntable{\n\tborder: 2px solid;\n\n}\ntr{\n\n\tborder: 1px solid;\n} td{\n\tborder: 1px solid;\n\theight:10px;\n\twidth: 20px;\n}\n"]}

635
dist/front.3abc0af9.js vendored Normal file
View File

@ -0,0 +1,635 @@
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
parcelRequire = (function (modules, cache, entry, globalName) {
// Save the require from previous bundle to this closure if any
var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
var nodeRequire = typeof require === 'function' && require;
function newRequire(name, jumped) {
if (!cache[name]) {
if (!modules[name]) {
// if we cannot find the module within our internal map or
// cache jump to the current global require ie. the last bundle
// that was added to the page.
var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
if (!jumped && currentRequire) {
return currentRequire(name, true);
}
// If there are other bundles on this page the require from the
// previous one is saved to 'previousRequire'. Repeat this as
// many times as there are bundles until the module is found or
// we exhaust the require chain.
if (previousRequire) {
return previousRequire(name, true);
}
// Try the node require function if it exists.
if (nodeRequire && typeof name === 'string') {
return nodeRequire(name);
}
var err = new Error('Cannot find module \'' + name + '\'');
err.code = 'MODULE_NOT_FOUND';
throw err;
}
localRequire.resolve = resolve;
localRequire.cache = {};
var module = cache[name] = new newRequire.Module(name);
modules[name][0].call(module.exports, localRequire, module, module.exports, this);
}
return cache[name].exports;
function localRequire(x){
return newRequire(localRequire.resolve(x));
}
function resolve(x){
return modules[name][1][x] || x;
}
}
function Module(moduleName) {
this.id = moduleName;
this.bundle = newRequire;
this.exports = {};
}
newRequire.isParcelRequire = true;
newRequire.Module = Module;
newRequire.modules = modules;
newRequire.cache = cache;
newRequire.parent = previousRequire;
newRequire.register = function (id, exports) {
modules[id] = [function (require, module) {
module.exports = exports;
}, {}];
};
var error;
for (var i = 0; i < entry.length; i++) {
try {
newRequire(entry[i]);
} catch (e) {
// Save first error but execute all entries
if (!error) {
error = e;
}
}
}
if (entry.length) {
// Expose entry point to Node, AMD or browser globals
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
var mainExports = newRequire(entry[entry.length - 1]);
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = mainExports;
// RequireJS
} else if (typeof define === "function" && define.amd) {
define(function () {
return mainExports;
});
// <script>
} else if (globalName) {
this[globalName] = mainExports;
}
}
// Override the current require with this new one
parcelRequire = newRequire;
if (error) {
// throw error from earlier, _after updating parcelRequire_
throw error;
}
return newRequire;
})({"../node_modules/parcel/src/builtins/bundle-url.js":[function(require,module,exports) {
var bundleURL = null;
function getBundleURLCached() {
if (!bundleURL) {
bundleURL = getBundleURL();
}
return bundleURL;
}
function getBundleURL() {
// Attempt to find the URL of the current script and use that as the base URL
try {
throw new Error();
} catch (err) {
var matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);
if (matches) {
return getBaseURL(matches[0]);
}
}
return '/';
}
function getBaseURL(url) {
return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/, '$1') + '/';
}
exports.getBundleURL = getBundleURLCached;
exports.getBaseURL = getBaseURL;
},{}],"../node_modules/parcel/src/builtins/css-loader.js":[function(require,module,exports) {
var bundle = require('./bundle-url');
function updateLink(link) {
var newLink = link.cloneNode();
newLink.onload = function () {
link.remove();
};
newLink.href = link.href.split('?')[0] + '?' + Date.now();
link.parentNode.insertBefore(newLink, link.nextSibling);
}
var cssTimeout = null;
function reloadCSS() {
if (cssTimeout) {
return;
}
cssTimeout = setTimeout(function () {
var links = document.querySelectorAll('link[rel="stylesheet"]');
for (var i = 0; i < links.length; i++) {
if (bundle.getBaseURL(links[i].href) === bundle.getBundleURL()) {
updateLink(links[i]);
}
}
cssTimeout = null;
}, 50);
}
module.exports = reloadCSS;
},{"./bundle-url":"../node_modules/parcel/src/builtins/bundle-url.js"}],"style.css":[function(require,module,exports) {
var reloadCSS = require('_css_loader');
module.hot.dispose(reloadCSS);
module.hot.accept(reloadCSS);
},{"_css_loader":"../node_modules/parcel/src/builtins/css-loader.js"}],"../node_modules/@dzeio/dom-manager/dist/DOMElement.js":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class DOMElement {
constructor(tagName, options) {
if (tagName instanceof HTMLElement) {
this.item = tagName;
return;
}
this.item = document.createElement(tagName, options);
}
static create(tagName, options) {
return new DOMElement(tagName, options);
}
static get(query, source) {
if (!(query instanceof HTMLElement)) {
const tmp = (source instanceof DOMElement ? source.item : source || document).querySelector(query);
if (!tmp) {
return undefined;
}
return new DOMElement(tmp);
}
return new DOMElement(query);
}
on(type, listener, options) {
this.item.addEventListener(type, listener, options);
return this;
}
off(type, listener) {
this.item.removeEventListener(type, listener);
return this;
}
text(val) {
if (val) {
this.item.innerText = val;
return this;
}
return this.item.innerText;
}
html(val) {
if (val) {
this.item.innerHTML = val;
return this;
}
return this.item.innerText;
}
addClass(...classes) {
this.item.classList.add(...classes);
return this;
}
setClass(...classes) {
this.item.classList.forEach((cls) => {
if (!classes.includes(cls)) {
this.item.classList.remove(cls);
}
});
this.addClass(...classes);
return this;
}
classList(...classes) {
if (!classes) {
const res = [];
this.item.classList.forEach((el) => res.push(el));
return res;
}
return this.setClass(...classes);
}
toggleClass(...classes) {
for (const classe of classes) {
this.item.classList.toggle(classe);
}
return this;
}
removeClass(...classes) {
this.item.classList.remove(...classes);
return this;
}
emit(event) {
if (event in this.item) {
this.item[event]();
return this;
}
this.item.dispatchEvent(new Event(event));
return this;
}
attr(key, value) {
if (!value) {
return this.item.getAttribute(key);
}
if (value === null) {
this.item.removeAttribute(key);
return this;
}
if (typeof value === 'boolean') {
this.item[key] = value;
return this;
}
this.item.setAttribute(key, value);
return this;
}
data(key, value) {
// @ts-ignore
return this.attr(`data-${key}`, value);
}
style(key, value) {
if (typeof value === 'undefined') {
return this.item.style[key];
}
this.item.style[key] = value;
return this;
}
exist() {
return !!this.item;
}
placeBefore(item) {
if (item instanceof DOMElement) {
item = item.item;
}
const parent = item.parentElement;
if (!parent) {
throw new Error('can\'t place DOMElement before item because it has no parent');
}
parent.insertBefore(this.item, item);
return this;
}
placeAsChildOf(item) {
if (item instanceof DOMElement) {
item = item.item;
}
item.appendChild(this.item);
return this;
}
place(verb, item) {
if (verb === 'before') {
return this.placeBefore(item);
}
else {
return this.placeAsChildOf(item);
}
}
}
exports.default = DOMElement;
},{}],"../node_modules/@dzeio/dom-manager/dist/DOMFleetManager.js":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
class DOMFleetManager {
constructor(query, source) {
this.query = query;
this.source = source;
this.items = [];
this.refresh();
}
last() {
return this.items[this.items.length - 1];
}
each(fn) {
this.items.forEach((el, index) => fn(el, index));
}
on(type, listener, options) {
this.each((item) => item.on(type, listener, options));
}
off(type, listener) {
this.each((item) => item.off(type, listener));
}
refresh() {
this.items = [];
(this.source instanceof _1.DOMElement ? this.source.item : this.source || document).querySelectorAll(this.query).forEach((item) => {
const element = _1.DOMElement.get(item);
if (!element) {
return;
}
this.items.push(element);
});
}
[Symbol.iterator]() {
return this.items;
}
}
exports.default = DOMFleetManager;
},{".":"../node_modules/@dzeio/dom-manager/dist/index.js"}],"../node_modules/@dzeio/dom-manager/dist/index.js":[function(require,module,exports) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DOMFleetManager = exports.DOMElement = void 0;
const DOMElement_1 = __importDefault(require("./DOMElement"));
exports.DOMElement = DOMElement_1.default;
const DOMFleetManager_1 = __importDefault(require("./DOMFleetManager"));
exports.DOMFleetManager = DOMFleetManager_1.default;
},{"./DOMElement":"../node_modules/@dzeio/dom-manager/dist/DOMElement.js","./DOMFleetManager":"../node_modules/@dzeio/dom-manager/dist/DOMFleetManager.js"}],"front.ts":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
require("./style.css");
var dom_manager_1 = require("@dzeio/dom-manager");
var Game =
/** @class */
function () {
function Game(table) {
this.table = new dom_manager_1.DOMElement(table);
var rows = new dom_manager_1.DOMFleetManager('tr', this.table);
rows.each(function (item) {
console.log(item.item);
});
}
Game.prototype.setupGeneral = function () {};
Game.prototype.setupMultiplayer = function () {};
Game.prototype.setupSinglePlayer = function () {};
/**
* Make a move and return and true if the move was done and false if the move was not done
*/
Game.prototype.makeMove = function (xPos) {
return true;
};
Game.prototype.checkWinner = function () {};
Game.prototype.makeIATakeTurn = function () {};
return Game;
}();
exports.default = Game;
},{"./style.css":"style.css","@dzeio/dom-manager":"../node_modules/@dzeio/dom-manager/dist/index.js"}],"../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
var global = arguments[3];
var OVERLAY_ID = '__parcel__error__overlay__';
var OldModule = module.bundle.Module;
function Module(moduleName) {
OldModule.call(this, moduleName);
this.hot = {
data: module.bundle.hotData,
_acceptCallbacks: [],
_disposeCallbacks: [],
accept: function (fn) {
this._acceptCallbacks.push(fn || function () {});
},
dispose: function (fn) {
this._disposeCallbacks.push(fn);
}
};
module.bundle.hotData = null;
}
module.bundle.Module = Module;
var checkedAssets, assetsToAccept;
var parent = module.bundle.parent;
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
var hostname = "" || location.hostname;
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + "42925" + '/');
ws.onmessage = function (event) {
checkedAssets = {};
assetsToAccept = [];
var data = JSON.parse(event.data);
if (data.type === 'update') {
var handled = false;
data.assets.forEach(function (asset) {
if (!asset.isNew) {
var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
if (didAccept) {
handled = true;
}
}
}); // Enable HMR for CSS by default.
handled = handled || data.assets.every(function (asset) {
return asset.type === 'css' && asset.generated.js;
});
if (handled) {
console.clear();
data.assets.forEach(function (asset) {
hmrApply(global.parcelRequire, asset);
});
assetsToAccept.forEach(function (v) {
hmrAcceptRun(v[0], v[1]);
});
} else if (location.reload) {
// `location` global exists in a web worker context but lacks `.reload()` function.
location.reload();
}
}
if (data.type === 'reload') {
ws.close();
ws.onclose = function () {
location.reload();
};
}
if (data.type === 'error-resolved') {
console.log('[parcel] ✨ Error resolved');
removeErrorOverlay();
}
if (data.type === 'error') {
console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
removeErrorOverlay();
var overlay = createErrorOverlay(data);
document.body.appendChild(overlay);
}
};
}
function removeErrorOverlay() {
var overlay = document.getElementById(OVERLAY_ID);
if (overlay) {
overlay.remove();
}
}
function createErrorOverlay(data) {
var overlay = document.createElement('div');
overlay.id = OVERLAY_ID; // html encode message and stack trace
var message = document.createElement('div');
var stackTrace = document.createElement('pre');
message.innerText = data.error.message;
stackTrace.innerText = data.error.stack;
overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
return overlay;
}
function getParents(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return [];
}
var parents = [];
var k, d, dep;
for (k in modules) {
for (d in modules[k][1]) {
dep = modules[k][1][d];
if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
parents.push(k);
}
}
}
if (bundle.parent) {
parents = parents.concat(getParents(bundle.parent, id));
}
return parents;
}
function hmrApply(bundle, asset) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (modules[asset.id] || !bundle.parent) {
var fn = new Function('require', 'module', 'exports', asset.generated.js);
asset.isNew = !modules[asset.id];
modules[asset.id] = [fn, asset.deps];
} else if (bundle.parent) {
hmrApply(bundle.parent, asset);
}
}
function hmrAcceptCheck(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (!modules[id] && bundle.parent) {
return hmrAcceptCheck(bundle.parent, id);
}
if (checkedAssets[id]) {
return;
}
checkedAssets[id] = true;
var cached = bundle.cache[id];
assetsToAccept.push([bundle, id]);
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
return true;
}
return getParents(global.parcelRequire, id).some(function (id) {
return hmrAcceptCheck(global.parcelRequire, id);
});
}
function hmrAcceptRun(bundle, id) {
var cached = bundle.cache[id];
bundle.hotData = {};
if (cached) {
cached.hot.data = bundle.hotData;
}
if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
cached.hot._disposeCallbacks.forEach(function (cb) {
cb(bundle.hotData);
});
}
delete bundle.cache[id];
bundle(id);
cached = bundle.cache[id];
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
cached.hot._acceptCallbacks.forEach(function (cb) {
cb();
});
return true;
}
}
},{}]},{},["../node_modules/parcel/src/builtins/hmr-runtime.js","front.ts"], null)
//# sourceMappingURL=/front.3abc0af9.js.map

1
dist/front.3abc0af9.js.map vendored Normal file

File diff suppressed because one or more lines are too long

72
dist/index.html vendored Normal file
View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Puissance 4</title>
<link rel="stylesheet" href="/main.c39d6dcf.css"></head>
<body>
<div class="tableContainer">
<table>
<tr>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
</tr>
<tr>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
</tr>
</table>
</div>
</body>
<script src="/main.c39d6dcf.js"></script>
</html>

39
dist/main.c39d6dcf.css vendored Normal file
View File

@ -0,0 +1,39 @@
body {
margin: 0;
padding: 0;
}
.tableContainer {
display: flex;
align-items: center;
justify-content: center;
height: 40rem;
}
table {
border: 2px solid;
}
tr {
border: 1px solid;
}
td {
border: 1px solid;
height: 10px;
width: 20px;
}
td[data-color="red"] {
background: red
}
td[data-color="yellow"] {
background: yellow
}
/*# sourceMappingURL=/main.c39d6dcf.css.map */

1
dist/main.c39d6dcf.css.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["style.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"main.c39d6dcf.css","sourceRoot":"../public","sourcesContent":["body {\n margin: 0;\n padding: 0;\n\n}\n\n.tableContainer {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 40rem;\n}\n\ntable {\n border: 2px solid;\n\n}\n\ntr {\n\n border: 1px solid;\n}\n\ntd {\n border: 1px solid;\n height: 10px;\n width: 20px;\n}\n\ntd[data-color=\"red\"] {\n background: red\n}\n\ntd[data-color=\"yellow\"] {\n background: yellow\n}\n"]}

722
dist/main.c39d6dcf.js vendored Normal file
View File

@ -0,0 +1,722 @@
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
parcelRequire = (function (modules, cache, entry, globalName) {
// Save the require from previous bundle to this closure if any
var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
var nodeRequire = typeof require === 'function' && require;
function newRequire(name, jumped) {
if (!cache[name]) {
if (!modules[name]) {
// if we cannot find the module within our internal map or
// cache jump to the current global require ie. the last bundle
// that was added to the page.
var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
if (!jumped && currentRequire) {
return currentRequire(name, true);
}
// If there are other bundles on this page the require from the
// previous one is saved to 'previousRequire'. Repeat this as
// many times as there are bundles until the module is found or
// we exhaust the require chain.
if (previousRequire) {
return previousRequire(name, true);
}
// Try the node require function if it exists.
if (nodeRequire && typeof name === 'string') {
return nodeRequire(name);
}
var err = new Error('Cannot find module \'' + name + '\'');
err.code = 'MODULE_NOT_FOUND';
throw err;
}
localRequire.resolve = resolve;
localRequire.cache = {};
var module = cache[name] = new newRequire.Module(name);
modules[name][0].call(module.exports, localRequire, module, module.exports, this);
}
return cache[name].exports;
function localRequire(x){
return newRequire(localRequire.resolve(x));
}
function resolve(x){
return modules[name][1][x] || x;
}
}
function Module(moduleName) {
this.id = moduleName;
this.bundle = newRequire;
this.exports = {};
}
newRequire.isParcelRequire = true;
newRequire.Module = Module;
newRequire.modules = modules;
newRequire.cache = cache;
newRequire.parent = previousRequire;
newRequire.register = function (id, exports) {
modules[id] = [function (require, module) {
module.exports = exports;
}, {}];
};
var error;
for (var i = 0; i < entry.length; i++) {
try {
newRequire(entry[i]);
} catch (e) {
// Save first error but execute all entries
if (!error) {
error = e;
}
}
}
if (entry.length) {
// Expose entry point to Node, AMD or browser globals
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
var mainExports = newRequire(entry[entry.length - 1]);
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = mainExports;
// RequireJS
} else if (typeof define === "function" && define.amd) {
define(function () {
return mainExports;
});
// <script>
} else if (globalName) {
this[globalName] = mainExports;
}
}
// Override the current require with this new one
parcelRequire = newRequire;
if (error) {
// throw error from earlier, _after updating parcelRequire_
throw error;
}
return newRequire;
})({"../node_modules/parcel/src/builtins/bundle-url.js":[function(require,module,exports) {
var bundleURL = null;
function getBundleURLCached() {
if (!bundleURL) {
bundleURL = getBundleURL();
}
return bundleURL;
}
function getBundleURL() {
// Attempt to find the URL of the current script and use that as the base URL
try {
throw new Error();
} catch (err) {
var matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);
if (matches) {
return getBaseURL(matches[0]);
}
}
return '/';
}
function getBaseURL(url) {
return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/, '$1') + '/';
}
exports.getBundleURL = getBundleURLCached;
exports.getBaseURL = getBaseURL;
},{}],"../node_modules/parcel/src/builtins/css-loader.js":[function(require,module,exports) {
var bundle = require('./bundle-url');
function updateLink(link) {
var newLink = link.cloneNode();
newLink.onload = function () {
link.remove();
};
newLink.href = link.href.split('?')[0] + '?' + Date.now();
link.parentNode.insertBefore(newLink, link.nextSibling);
}
var cssTimeout = null;
function reloadCSS() {
if (cssTimeout) {
return;
}
cssTimeout = setTimeout(function () {
var links = document.querySelectorAll('link[rel="stylesheet"]');
for (var i = 0; i < links.length; i++) {
if (bundle.getBaseURL(links[i].href) === bundle.getBundleURL()) {
updateLink(links[i]);
}
}
cssTimeout = null;
}, 50);
}
module.exports = reloadCSS;
},{"./bundle-url":"../node_modules/parcel/src/builtins/bundle-url.js"}],"style.css":[function(require,module,exports) {
var reloadCSS = require('_css_loader');
module.hot.dispose(reloadCSS);
module.hot.accept(reloadCSS);
},{"_css_loader":"../node_modules/parcel/src/builtins/css-loader.js"}],"../node_modules/@dzeio/dom-manager/dist/DOMElement.js":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class DOMElement {
constructor(tagName, options) {
if (tagName instanceof HTMLElement) {
this.item = tagName;
return;
}
this.item = document.createElement(tagName, options);
}
static create(tagName, options) {
return new DOMElement(tagName, options);
}
static get(query, source) {
if (!(query instanceof HTMLElement)) {
const tmp = (source instanceof DOMElement ? source.item : source || document).querySelector(query);
if (!tmp) {
return undefined;
}
return new DOMElement(tmp);
}
return new DOMElement(query);
}
on(type, listener, options) {
this.item.addEventListener(type, listener, options);
return this;
}
off(type, listener) {
this.item.removeEventListener(type, listener);
return this;
}
text(val) {
if (val) {
this.item.innerText = val;
return this;
}
return this.item.innerText;
}
html(val) {
if (val) {
this.item.innerHTML = val;
return this;
}
return this.item.innerText;
}
addClass(...classes) {
this.item.classList.add(...classes);
return this;
}
setClass(...classes) {
this.item.classList.forEach((cls) => {
if (!classes.includes(cls)) {
this.item.classList.remove(cls);
}
});
this.addClass(...classes);
return this;
}
classList(...classes) {
if (!classes) {
const res = [];
this.item.classList.forEach((el) => res.push(el));
return res;
}
return this.setClass(...classes);
}
toggleClass(...classes) {
for (const classe of classes) {
this.item.classList.toggle(classe);
}
return this;
}
removeClass(...classes) {
this.item.classList.remove(...classes);
return this;
}
emit(event) {
if (event in this.item) {
this.item[event]();
return this;
}
this.item.dispatchEvent(new Event(event));
return this;
}
attr(key, value) {
if (!value) {
return this.item.getAttribute(key);
}
if (value === null) {
this.item.removeAttribute(key);
return this;
}
if (typeof value === 'boolean') {
this.item[key] = value;
return this;
}
this.item.setAttribute(key, value);
return this;
}
data(key, value) {
// @ts-ignore
return this.attr(`data-${key}`, value);
}
style(key, value) {
if (typeof value === 'undefined') {
return this.item.style[key];
}
this.item.style[key] = value;
return this;
}
exist() {
return !!this.item;
}
placeBefore(item) {
if (item instanceof DOMElement) {
item = item.item;
}
const parent = item.parentElement;
if (!parent) {
throw new Error('can\'t place DOMElement before item because it has no parent');
}
parent.insertBefore(this.item, item);
return this;
}
placeAsChildOf(item) {
if (item instanceof DOMElement) {
item = item.item;
}
item.appendChild(this.item);
return this;
}
place(verb, item) {
if (verb === 'before') {
return this.placeBefore(item);
}
else {
return this.placeAsChildOf(item);
}
}
}
exports.default = DOMElement;
},{}],"../node_modules/@dzeio/dom-manager/dist/DOMFleetManager.js":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const _1 = require(".");
class DOMFleetManager {
constructor(query, source) {
this.query = query;
this.source = source;
this.items = [];
this.refresh();
}
last() {
return this.items[this.items.length - 1];
}
each(fn) {
this.items.forEach((el, index) => fn(el, index));
}
on(type, listener, options) {
this.each((item) => item.on(type, listener, options));
}
off(type, listener) {
this.each((item) => item.off(type, listener));
}
refresh() {
this.items = [];
(this.source instanceof _1.DOMElement ? this.source.item : this.source || document).querySelectorAll(this.query).forEach((item) => {
const element = _1.DOMElement.get(item);
if (!element) {
return;
}
this.items.push(element);
});
}
[Symbol.iterator]() {
return this.items;
}
}
exports.default = DOMFleetManager;
},{".":"../node_modules/@dzeio/dom-manager/dist/index.js"}],"../node_modules/@dzeio/dom-manager/dist/index.js":[function(require,module,exports) {
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.DOMFleetManager = exports.DOMElement = void 0;
const DOMElement_1 = __importDefault(require("./DOMElement"));
exports.DOMElement = DOMElement_1.default;
const DOMFleetManager_1 = __importDefault(require("./DOMFleetManager"));
exports.DOMFleetManager = DOMFleetManager_1.default;
},{"./DOMElement":"../node_modules/@dzeio/dom-manager/dist/DOMElement.js","./DOMFleetManager":"../node_modules/@dzeio/dom-manager/dist/DOMFleetManager.js"}],"Game.ts":[function(require,module,exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
var dom_manager_1 = require("@dzeio/dom-manager");
var Game =
/** @class */
function () {
function Game(table) {
this.columns = [];
this.rows = [];
this.table = new dom_manager_1.DOMElement(table);
this.setupGeneral();
}
Game.prototype.setupGeneral = function () {
var _this = this; // Clear la table
var rows = new dom_manager_1.DOMFleetManager('tr', this.table);
rows.each(function (item, rowIndex) {
var cells = new dom_manager_1.DOMFleetManager('td', item);
_this.rows.push([]); // cellIndex = 0-6
cells.each(function (cell, cellIndex) {
_this.rows[rowIndex].push(cell);
if (_this.columns.length <= cellIndex) {
_this.columns.push([]);
}
_this.columns[cellIndex].push(cell);
cell.text(' ').data('color', null); // Put each cells in the corresponding column
});
console.log(_this.columns);
}); // Setup la base du jeux
};
Game.prototype.setupMultiplayer = function () {};
Game.prototype.setupSinglePlayer = function () {};
/**
* Make a move and return and true if the move was done and false if the move was not done
*/
Game.prototype.makeMove = function (xPos, color) {
var cellToFill;
for (var _i = 0, _a = this.columns[xPos]; _i < _a.length; _i++) {
var cell = _a[_i];
var color_1 = cell.data('color');
if (!color_1) {
cellToFill = cell;
}
if (color_1) {
break;
}
}
if (!cellToFill) {
return false;
}
cellToFill.data('color', color);
return true;
};
Game.prototype.checkWinner = function () {};
Game.prototype.makeIATakeTurn = function () {
var turnDone = false;
while (!turnDone) {
var pos = getRandomInt(0, this.columns.length - 1);
turnDone = this.makeMove(pos, 'red');
}
};
return Game;
}();
exports.default = Game;
function getRandomInt(min, max) {
return Math.floor(Math.random() * (max + 1 - min)) + min;
} // const cell = new DOMElement('tr')
// cell.data('color') // return 'red | 'yello' pour get
// cell.data('color', 'red') //return void pour set
},{"@dzeio/dom-manager":"../node_modules/@dzeio/dom-manager/dist/index.js"}],"main.ts":[function(require,module,exports) {
"use strict";
var __importDefault = this && this.__importDefault || function (mod) {
return mod && mod.__esModule ? mod : {
"default": mod
};
};
Object.defineProperty(exports, "__esModule", {
value: true
});
require("./style.css");
var Game_1 = __importDefault(require("./Game"));
var table = document.querySelector('table');
if (!table) {
throw new Error('Table not found');
}
var game = new Game_1.default(table);
game.makeMove(0, 'red');
game.makeIATakeTurn();
game.makeMove(0, 'red');
game.makeMove(0, 'red');
game.makeMove(0, 'red');
game.makeMove(0, 'red');
game.makeMove(0, 'red');
game.makeMove(0, 'red');
game.makeMove(0, 'red');
},{"./style.css":"style.css","./Game":"Game.ts"}],"../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
var global = arguments[3];
var OVERLAY_ID = '__parcel__error__overlay__';
var OldModule = module.bundle.Module;
function Module(moduleName) {
OldModule.call(this, moduleName);
this.hot = {
data: module.bundle.hotData,
_acceptCallbacks: [],
_disposeCallbacks: [],
accept: function (fn) {
this._acceptCallbacks.push(fn || function () {});
},
dispose: function (fn) {
this._disposeCallbacks.push(fn);
}
};
module.bundle.hotData = null;
}
module.bundle.Module = Module;
var checkedAssets, assetsToAccept;
var parent = module.bundle.parent;
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
var hostname = "" || location.hostname;
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + "42925" + '/');
ws.onmessage = function (event) {
checkedAssets = {};
assetsToAccept = [];
var data = JSON.parse(event.data);
if (data.type === 'update') {
var handled = false;
data.assets.forEach(function (asset) {
if (!asset.isNew) {
var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
if (didAccept) {
handled = true;
}
}
}); // Enable HMR for CSS by default.
handled = handled || data.assets.every(function (asset) {
return asset.type === 'css' && asset.generated.js;
});
if (handled) {
console.clear();
data.assets.forEach(function (asset) {
hmrApply(global.parcelRequire, asset);
});
assetsToAccept.forEach(function (v) {
hmrAcceptRun(v[0], v[1]);
});
} else if (location.reload) {
// `location` global exists in a web worker context but lacks `.reload()` function.
location.reload();
}
}
if (data.type === 'reload') {
ws.close();
ws.onclose = function () {
location.reload();
};
}
if (data.type === 'error-resolved') {
console.log('[parcel] ✨ Error resolved');
removeErrorOverlay();
}
if (data.type === 'error') {
console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
removeErrorOverlay();
var overlay = createErrorOverlay(data);
document.body.appendChild(overlay);
}
};
}
function removeErrorOverlay() {
var overlay = document.getElementById(OVERLAY_ID);
if (overlay) {
overlay.remove();
}
}
function createErrorOverlay(data) {
var overlay = document.createElement('div');
overlay.id = OVERLAY_ID; // html encode message and stack trace
var message = document.createElement('div');
var stackTrace = document.createElement('pre');
message.innerText = data.error.message;
stackTrace.innerText = data.error.stack;
overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
return overlay;
}
function getParents(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return [];
}
var parents = [];
var k, d, dep;
for (k in modules) {
for (d in modules[k][1]) {
dep = modules[k][1][d];
if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
parents.push(k);
}
}
}
if (bundle.parent) {
parents = parents.concat(getParents(bundle.parent, id));
}
return parents;
}
function hmrApply(bundle, asset) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (modules[asset.id] || !bundle.parent) {
var fn = new Function('require', 'module', 'exports', asset.generated.js);
asset.isNew = !modules[asset.id];
modules[asset.id] = [fn, asset.deps];
} else if (bundle.parent) {
hmrApply(bundle.parent, asset);
}
}
function hmrAcceptCheck(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (!modules[id] && bundle.parent) {
return hmrAcceptCheck(bundle.parent, id);
}
if (checkedAssets[id]) {
return;
}
checkedAssets[id] = true;
var cached = bundle.cache[id];
assetsToAccept.push([bundle, id]);
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
return true;
}
return getParents(global.parcelRequire, id).some(function (id) {
return hmrAcceptCheck(global.parcelRequire, id);
});
}
function hmrAcceptRun(bundle, id) {
var cached = bundle.cache[id];
bundle.hotData = {};
if (cached) {
cached.hot.data = bundle.hotData;
}
if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
cached.hot._disposeCallbacks.forEach(function (cb) {
cb(bundle.hotData);
});
}
delete bundle.cache[id];
bundle(id);
cached = bundle.cache[id];
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
cached.hot._acceptCallbacks.forEach(function (cb) {
cb();
});
return true;
}
}
},{}]},{},["../node_modules/parcel/src/builtins/hmr-runtime.js","main.ts"], null)
//# sourceMappingURL=/main.c39d6dcf.js.map

1
dist/main.c39d6dcf.js.map vendored Normal file

File diff suppressed because one or more lines are too long

26
dist/style.e308ff8e.css vendored Normal file
View File

@ -0,0 +1,26 @@
body{
margin: 0;
padding:0;
}
.tableContainer{
display:flex;
align-items: center;
justify-content: center;
height: 40rem;
}
table{
border: 2px solid;
}
tr{
border: 1px solid;
} td{
border: 1px solid;
height:10px;
width: 20px;
}
/*# sourceMappingURL=/style.e308ff8e.css.map */

1
dist/style.e308ff8e.css.map vendored Normal file
View File

@ -0,0 +1 @@
{"version":3,"sources":["style.css"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"style.e308ff8e.css","sourceRoot":"../public","sourcesContent":["body{\n\tmargin: 0;\n\tpadding:0;\n\n}\n.tableContainer{\n\tdisplay:flex;\n\talign-items: center;\n\tjustify-content: center;\n\theight: 40rem;\n}\ntable{\n\tborder: 2px solid;\n\n}\ntr{\n\n\tborder: 1px solid;\n} td{\n\tborder: 1px solid;\n\theight:10px;\n\twidth: 20px;\n}\n"]}

397
dist/style.e308ff8e.js vendored Normal file
View File

@ -0,0 +1,397 @@
// modules are defined as an array
// [ module function, map of requires ]
//
// map of requires is short require name -> numeric require
//
// anything defined in a previous bundle is accessed via the
// orig method which is the require for previous bundles
parcelRequire = (function (modules, cache, entry, globalName) {
// Save the require from previous bundle to this closure if any
var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
var nodeRequire = typeof require === 'function' && require;
function newRequire(name, jumped) {
if (!cache[name]) {
if (!modules[name]) {
// if we cannot find the module within our internal map or
// cache jump to the current global require ie. the last bundle
// that was added to the page.
var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
if (!jumped && currentRequire) {
return currentRequire(name, true);
}
// If there are other bundles on this page the require from the
// previous one is saved to 'previousRequire'. Repeat this as
// many times as there are bundles until the module is found or
// we exhaust the require chain.
if (previousRequire) {
return previousRequire(name, true);
}
// Try the node require function if it exists.
if (nodeRequire && typeof name === 'string') {
return nodeRequire(name);
}
var err = new Error('Cannot find module \'' + name + '\'');
err.code = 'MODULE_NOT_FOUND';
throw err;
}
localRequire.resolve = resolve;
localRequire.cache = {};
var module = cache[name] = new newRequire.Module(name);
modules[name][0].call(module.exports, localRequire, module, module.exports, this);
}
return cache[name].exports;
function localRequire(x){
return newRequire(localRequire.resolve(x));
}
function resolve(x){
return modules[name][1][x] || x;
}
}
function Module(moduleName) {
this.id = moduleName;
this.bundle = newRequire;
this.exports = {};
}
newRequire.isParcelRequire = true;
newRequire.Module = Module;
newRequire.modules = modules;
newRequire.cache = cache;
newRequire.parent = previousRequire;
newRequire.register = function (id, exports) {
modules[id] = [function (require, module) {
module.exports = exports;
}, {}];
};
var error;
for (var i = 0; i < entry.length; i++) {
try {
newRequire(entry[i]);
} catch (e) {
// Save first error but execute all entries
if (!error) {
error = e;
}
}
}
if (entry.length) {
// Expose entry point to Node, AMD or browser globals
// Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
var mainExports = newRequire(entry[entry.length - 1]);
// CommonJS
if (typeof exports === "object" && typeof module !== "undefined") {
module.exports = mainExports;
// RequireJS
} else if (typeof define === "function" && define.amd) {
define(function () {
return mainExports;
});
// <script>
} else if (globalName) {
this[globalName] = mainExports;
}
}
// Override the current require with this new one
parcelRequire = newRequire;
if (error) {
// throw error from earlier, _after updating parcelRequire_
throw error;
}
return newRequire;
})({"../node_modules/parcel/src/builtins/bundle-url.js":[function(require,module,exports) {
var bundleURL = null;
function getBundleURLCached() {
if (!bundleURL) {
bundleURL = getBundleURL();
}
return bundleURL;
}
function getBundleURL() {
// Attempt to find the URL of the current script and use that as the base URL
try {
throw new Error();
} catch (err) {
var matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);
if (matches) {
return getBaseURL(matches[0]);
}
}
return '/';
}
function getBaseURL(url) {
return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/, '$1') + '/';
}
exports.getBundleURL = getBundleURLCached;
exports.getBaseURL = getBaseURL;
},{}],"../node_modules/parcel/src/builtins/css-loader.js":[function(require,module,exports) {
var bundle = require('./bundle-url');
function updateLink(link) {
var newLink = link.cloneNode();
newLink.onload = function () {
link.remove();
};
newLink.href = link.href.split('?')[0] + '?' + Date.now();
link.parentNode.insertBefore(newLink, link.nextSibling);
}
var cssTimeout = null;
function reloadCSS() {
if (cssTimeout) {
return;
}
cssTimeout = setTimeout(function () {
var links = document.querySelectorAll('link[rel="stylesheet"]');
for (var i = 0; i < links.length; i++) {
if (bundle.getBaseURL(links[i].href) === bundle.getBundleURL()) {
updateLink(links[i]);
}
}
cssTimeout = null;
}, 50);
}
module.exports = reloadCSS;
},{"./bundle-url":"../node_modules/parcel/src/builtins/bundle-url.js"}],"style.css":[function(require,module,exports) {
var reloadCSS = require('_css_loader');
module.hot.dispose(reloadCSS);
module.hot.accept(reloadCSS);
},{"_css_loader":"../node_modules/parcel/src/builtins/css-loader.js"}],"../node_modules/parcel/src/builtins/hmr-runtime.js":[function(require,module,exports) {
var global = arguments[3];
var OVERLAY_ID = '__parcel__error__overlay__';
var OldModule = module.bundle.Module;
function Module(moduleName) {
OldModule.call(this, moduleName);
this.hot = {
data: module.bundle.hotData,
_acceptCallbacks: [],
_disposeCallbacks: [],
accept: function (fn) {
this._acceptCallbacks.push(fn || function () {});
},
dispose: function (fn) {
this._disposeCallbacks.push(fn);
}
};
module.bundle.hotData = null;
}
module.bundle.Module = Module;
var checkedAssets, assetsToAccept;
var parent = module.bundle.parent;
if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
var hostname = "" || location.hostname;
var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
var ws = new WebSocket(protocol + '://' + hostname + ':' + "42925" + '/');
ws.onmessage = function (event) {
checkedAssets = {};
assetsToAccept = [];
var data = JSON.parse(event.data);
if (data.type === 'update') {
var handled = false;
data.assets.forEach(function (asset) {
if (!asset.isNew) {
var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
if (didAccept) {
handled = true;
}
}
}); // Enable HMR for CSS by default.
handled = handled || data.assets.every(function (asset) {
return asset.type === 'css' && asset.generated.js;
});
if (handled) {
console.clear();
data.assets.forEach(function (asset) {
hmrApply(global.parcelRequire, asset);
});
assetsToAccept.forEach(function (v) {
hmrAcceptRun(v[0], v[1]);
});
} else if (location.reload) {
// `location` global exists in a web worker context but lacks `.reload()` function.
location.reload();
}
}
if (data.type === 'reload') {
ws.close();
ws.onclose = function () {
location.reload();
};
}
if (data.type === 'error-resolved') {
console.log('[parcel] ✨ Error resolved');
removeErrorOverlay();
}
if (data.type === 'error') {
console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
removeErrorOverlay();
var overlay = createErrorOverlay(data);
document.body.appendChild(overlay);
}
};
}
function removeErrorOverlay() {
var overlay = document.getElementById(OVERLAY_ID);
if (overlay) {
overlay.remove();
}
}
function createErrorOverlay(data) {
var overlay = document.createElement('div');
overlay.id = OVERLAY_ID; // html encode message and stack trace
var message = document.createElement('div');
var stackTrace = document.createElement('pre');
message.innerText = data.error.message;
stackTrace.innerText = data.error.stack;
overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
return overlay;
}
function getParents(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return [];
}
var parents = [];
var k, d, dep;
for (k in modules) {
for (d in modules[k][1]) {
dep = modules[k][1][d];
if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
parents.push(k);
}
}
}
if (bundle.parent) {
parents = parents.concat(getParents(bundle.parent, id));
}
return parents;
}
function hmrApply(bundle, asset) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (modules[asset.id] || !bundle.parent) {
var fn = new Function('require', 'module', 'exports', asset.generated.js);
asset.isNew = !modules[asset.id];
modules[asset.id] = [fn, asset.deps];
} else if (bundle.parent) {
hmrApply(bundle.parent, asset);
}
}
function hmrAcceptCheck(bundle, id) {
var modules = bundle.modules;
if (!modules) {
return;
}
if (!modules[id] && bundle.parent) {
return hmrAcceptCheck(bundle.parent, id);
}
if (checkedAssets[id]) {
return;
}
checkedAssets[id] = true;
var cached = bundle.cache[id];
assetsToAccept.push([bundle, id]);
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
return true;
}
return getParents(global.parcelRequire, id).some(function (id) {
return hmrAcceptCheck(global.parcelRequire, id);
});
}
function hmrAcceptRun(bundle, id) {
var cached = bundle.cache[id];
bundle.hotData = {};
if (cached) {
cached.hot.data = bundle.hotData;
}
if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
cached.hot._disposeCallbacks.forEach(function (cb) {
cb(bundle.hotData);
});
}
delete bundle.cache[id];
bundle(id);
cached = bundle.cache[id];
if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
cached.hot._acceptCallbacks.forEach(function (cb) {
cb();
});
return true;
}
}
},{}]},{},["../node_modules/parcel/src/builtins/hmr-runtime.js"], null)
//# sourceMappingURL=/style.e308ff8e.js.map

1
dist/style.e308ff8e.js.map vendored Normal file

File diff suppressed because one or more lines are too long

10
main.ts
View File

@ -0,0 +1,10 @@
import express from 'express'
const app = express();
app.use(express.static('public'))
var server = app.listen(3000, function () {
console.log(`Example app listening at http://localhost:3000`);
});

7083
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,19 @@
{
"name": "Puissance4",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"express": "^4.17.1",
"ts-node": "^9.1.1",
"ts-node-dev": "^1.1.1",
"typescript": "^4.1.3",
"websocket": "^1.0.33"
},
"scripts": {
"start": "ts-node main.ts",
"dev": "ts-node-dev main.ts"
}
"name": "Puissance4",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@types/express": "^4.17.9",
"express": "^4.17.1",
"nodemon": "^2.0.6",
"ts-node": "^9.1.1",
"ts-node-dev": "^1.1.1",
"typescript": "^4.1.3"
},
"scripts": {
"start": "ts-node main.ts",
"dev-front": "parcel public/index.html",
"dev": "ts-node-dev main.ts"
}
}

94
public/Game.ts Normal file
View File

@ -0,0 +1,94 @@
import { DOMElement, DOMFleetManager } from '@dzeio/dom-manager'
import { textChangeRangeIsUnchanged } from 'typescript'
export default class Game {
private table: DOMElement<HTMLTableElement>
private columns: Array<Array<DOMElement>> = []
private rows: Array<Array<DOMElement>> = []
public constructor(
table: HTMLTableElement
) {
this.table = new DOMElement(table)
this.setupGeneral()
}
public setupGeneral() {
// Clear la table
const rows = new DOMFleetManager('tr', this.table)
rows.each((item, rowIndex) => {
const cells = new DOMFleetManager('td', item)
this.rows.push([])
// cellIndex = 0-6
cells.each((cell, cellIndex) => {
this.rows[rowIndex].push(cell)
if (this.columns.length <= cellIndex) {
this.columns.push([])
}
this.columns[cellIndex].push(cell)
cell
.text(' ')
.data('color', null)
// Put each cells in the corresponding column
})
console.log(this.columns)
})
// Setup la base du jeux
}
public setupMultiplayer() { }
public setupSinglePlayer() { }
/**
* Make a move and return and true if the move was done and false if the move was not done
*/
public makeMove(xPos: number, color: 'red' | 'yellow'): boolean {
let cellToFill: DOMElement | undefined
for (const cell of this.columns[xPos]) {
const color = cell.data('color')
if (!color) {
cellToFill = cell
}
if (color) {
break
}
}
if (!cellToFill) {
return false
}
cellToFill.data('color', color)
return true
}
public checkWinner() {
}
public makeIATakeTurn() {
let turnDone = false
while (!turnDone) {
const pos = getRandomInt(0, this.columns.length - 1)
turnDone = this.makeMove(pos, 'red')
}
}
}
function getRandomInt(min: number, max: number) {
return Math.floor(Math.random() * ((max + 1) - min)) + min
}
// const cell = new DOMElement('tr')
// cell.data('color') // return 'red | 'yello' pour get
// cell.data('color', 'red') //return void pour set

72
public/index.html Normal file
View File

@ -0,0 +1,72 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Puissance 4</title>
</head>
<body>
<div class="tableContainer">
<table>
<tr>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
<td>1</td>
</tr>
<tr>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
<td>2</td>
</tr>
<tr>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
<td>5</td>
</tr>
<tr>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
<td>6</td>
</tr>
</table>
</div>
</body>
<script src="./main.ts"></script>
</html>

20
public/main.ts Normal file
View File

@ -0,0 +1,20 @@
import './style.css'
import Game from './Game'
const table = document.querySelector('table')
if (!table) {
throw new Error('Table not found')
}
const game = new Game(table)
game.makeMove(0, 'red')
game.makeIATakeTurn()
game.makeMove(0, 'red')
game.makeMove(0, 'red')
game.makeMove(0, 'red')
game.makeMove(0, 'red')
game.makeMove(0, 'red')
game.makeMove(0, 'red')
game.makeMove(0, 'red')

36
public/style.css Normal file
View File

@ -0,0 +1,36 @@
body {
margin: 0;
padding: 0;
}
.tableContainer {
display: flex;
align-items: center;
justify-content: center;
height: 40rem;
}
table {
border: 2px solid;
}
tr {
border: 1px solid;
}
td {
border: 1px solid;
height: 10px;
width: 20px;
}
td[data-color="red"] {
background: red
}
td[data-color="yellow"] {
background: yellow
}

70
tsconfig.json Normal file
View File

@ -0,0 +1,70 @@
{
"compilerOptions": {
/* Visit https://aka.ms/tsconfig.json to read more about this file */
/* Basic Options */
// "incremental": true, /* Enable incremental compilation */
"target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */
"module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */
// "lib": [], /* Specify library files to be included in the compilation. */
// "allowJs": true, /* Allow javascript files to be compiled. */
// "checkJs": true, /* Report errors in .js files. */
// "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */
// "declaration": true, /* Generates corresponding '.d.ts' file. */
// "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */
// "sourceMap": true, /* Generates corresponding '.map' file. */
// "outFile": "./", /* Concatenate and emit output to single file. */
// "outDir": "./", /* Redirect output structure to the directory. */
// "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */
// "composite": true, /* Enable project compilation */
// "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */
// "removeComments": true, /* Do not emit comments to output. */
// "noEmit": true, /* Do not emit outputs. */
// "importHelpers": true, /* Import emit helpers from 'tslib'. */
// "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */
// "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */
/* Strict Type-Checking Options */
"strict": true, /* Enable all strict type-checking options. */
// "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */
// "strictNullChecks": true, /* Enable strict null checks. */
// "strictFunctionTypes": true, /* Enable strict checking of function types. */
// "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */
// "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
// "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */
// "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
/* Additional Checks */
// "noUnusedLocals": true, /* Report errors on unused locals. */
// "noUnusedParameters": true, /* Report errors on unused parameters. */
// "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */
// "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
// "noUncheckedIndexedAccess": true, /* Include 'undefined' in index signature results */
/* Module Resolution Options */
// "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */
// "baseUrl": "./", /* Base directory to resolve non-absolute module names. */
// "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */
// "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
// "typeRoots": [], /* List of folders to include type definitions from. */
// "types": [], /* Type declaration files to be included in compilation. */
// "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */
"esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */
// "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
// "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */
/* Source Map Options */
// "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
// "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */
// "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
// "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
/* Experimental Options */
// "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
// "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
/* Advanced Options */
"skipLibCheck": true, /* Skip type checking of declaration files. */
"forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
}
}