diff --git a/casinoGameApp/DeckOfCards.ts b/casinoGameApp/DeckOfCards.ts new file mode 100644 index 00000000..e69de29b diff --git a/casinoGameApp/GameEngine.js b/casinoGameApp/GameEngine.js new file mode 100644 index 00000000..9d8ad30f --- /dev/null +++ b/casinoGameApp/GameEngine.js @@ -0,0 +1,6 @@ +"use strict"; +var GameEngine = /** @class */ (function () { + function GameEngine() { + } + return GameEngine; +}()); diff --git a/casinoGameApp/GameEngine.ts b/casinoGameApp/GameEngine.ts new file mode 100644 index 00000000..523a0b42 --- /dev/null +++ b/casinoGameApp/GameEngine.ts @@ -0,0 +1,15 @@ +import { PlayerInterface } from "./PlayerInterface"; + +namespace Casino { + + + + export abstract class GameEngine> + implements GameEngineInterface{ + + abstract getGame(): GameType; + abstract evaluateTurn(player: GameTypePlayer): void; + abstract run(): void; + } + +} \ No newline at end of file diff --git a/casinoGameApp/GameEngineInterface.js b/casinoGameApp/GameEngineInterface.js new file mode 100644 index 00000000..3918c74e --- /dev/null +++ b/casinoGameApp/GameEngineInterface.js @@ -0,0 +1 @@ +"use strict"; diff --git a/casinoGameApp/GameEngineInterface.ts b/casinoGameApp/GameEngineInterface.ts new file mode 100644 index 00000000..fe6063be --- /dev/null +++ b/casinoGameApp/GameEngineInterface.ts @@ -0,0 +1,15 @@ +import { PlayerInterface } from "./PlayerInterface"; + +namespace Casino { + export interface GameEngineInterface > { + getGame(): GameType; + //return the composite Game object to the client.\ + + evaluateTurn(player: T); + //evaluate the turn of a player. + + run(); + //begin game. + } + +} \ No newline at end of file diff --git a/casinoGameApp/GameInterface.js b/casinoGameApp/GameInterface.js new file mode 100644 index 00000000..3918c74e --- /dev/null +++ b/casinoGameApp/GameInterface.js @@ -0,0 +1 @@ +"use strict"; diff --git a/casinoGameApp/GameInterface.ts b/casinoGameApp/GameInterface.ts new file mode 100644 index 00000000..ed66b85a --- /dev/null +++ b/casinoGameApp/GameInterface.ts @@ -0,0 +1,17 @@ +namespace Casino{ + + export interface GameInterface { + //represents a game which handles some type of player + //should implement Runnable - done + + getPlayers(): T[]; + + getPlayer(playerId: number): T; + + addPlayer(player: T): void; + + removePlayer(player: T): void; + + contains(player: T): Boolean; + } +} \ No newline at end of file diff --git a/casinoGameApp/MainMenu.ts b/casinoGameApp/MainMenu.ts new file mode 100644 index 00000000..41d34d0c --- /dev/null +++ b/casinoGameApp/MainMenu.ts @@ -0,0 +1,48 @@ +namespace Casino { + export class MainMenu { + displayElement: HTMLElement = document.getElementById("display"); + submitButton: HTMLElement = document.getElementById("submit_button"); + private userProfile: Profile; + + //constructor + constructor(){ + this.menuStart = this.menuStart.bind(this); + this.createProfile = this.createProfile.bind(this); + this.gamePicker = this.gamePicker.bind(this); + } + + public menuStart(){ + this.displayElement.innerHTML = "Enter your name here"; + this.submitButton.addEventListener("click",(e: Event)=> this.createProfile(), {once: true}); + } + + private createProfile(){ + this.userProfile = new Profile(Input.getInput()); + this.displayElement.innerHTML += "
Hello " + this.userProfile.getUserName() + "!"; + this.displayElement.innerHTML += "
Please select a game.
1. Slots"; + this.submitButton.addEventListener("click", (e: Event) => this.gamePicker(), {once: true}); + } + + private gamePicker(){ + if(Input.getInput().toLowerCase() === 'gofish'){ + var gofishGame = new gofishGame(); + gofishGame.startGame(); + } + } + + + + + + + + + + + + + + + + } +} \ No newline at end of file diff --git a/casinoGameApp/Player.js b/casinoGameApp/Player.js new file mode 100644 index 00000000..af269634 --- /dev/null +++ b/casinoGameApp/Player.js @@ -0,0 +1,19 @@ +"use strict"; +var Player = /** @class */ (function () { + function Player() { + } + //represents a player within the context of a game + //should cease to exist upon termination of a game. - HOW? + //player should implement playerinterface - done + //player objecs should be created within the context of a game. + Player.prototype.getProfile = function () { + throw new Error("Method not implemented."); + }; + Player.prototype.getName = function () { + throw new Error("Method not implemented."); + }; + Player.prototype.getId = function () { + throw new Error("Method not implemented."); + }; + return Player; +}()); diff --git a/casinoGameApp/Player.ts b/casinoGameApp/Player.ts new file mode 100644 index 00000000..0275cd52 --- /dev/null +++ b/casinoGameApp/Player.ts @@ -0,0 +1,28 @@ +namespace Casino{ + class Player implements PlayerInterface { + private playerProfile: Profile; + + //constructor + constructor(playerProfile: Profile){ + this.playerProfile = playerProfile; + } + + //represents a player within the context of a game + //should cease to exist upon termination of a game. - HOW? + + //player should implement playerinterface - done + //player objecs should be created within the context of a game. + + getProfile(): Profile { + return this.playerProfile; + } + getName(): string { + return this.playerProfile.getUserName(); + } + getId(): number { + return this.playerProfile.getUserId(); + } + + + } +} \ No newline at end of file diff --git a/casinoGameApp/PlayerInterface.js b/casinoGameApp/PlayerInterface.js new file mode 100644 index 00000000..3918c74e --- /dev/null +++ b/casinoGameApp/PlayerInterface.js @@ -0,0 +1 @@ +"use strict"; diff --git a/casinoGameApp/PlayerInterface.ts b/casinoGameApp/PlayerInterface.ts new file mode 100644 index 00000000..7756cc74 --- /dev/null +++ b/casinoGameApp/PlayerInterface.ts @@ -0,0 +1,18 @@ +namespace Casino{ + export interface PlayerInterface{ + //is a contract to ensure that all players have reference to a profile, name and id + + + //needs 3 methods + //Profile getProfile() + //String getName() + //Long getId() + + //how do you make a method in typescript + getProfile(): Profile; + + getName(): string; + + getId(): number; + } +} \ No newline at end of file diff --git a/casinoGameApp/Profile.js b/casinoGameApp/Profile.js new file mode 100644 index 00000000..d34d8530 --- /dev/null +++ b/casinoGameApp/Profile.js @@ -0,0 +1,36 @@ +"use strict"; +var Profile = /** @class */ (function () { + function Profile(profileId, username, balance) { + this.id = profileId; + this.name = username; + this.balance = balance; + } + Object.defineProperty(Profile.prototype, "_id", { + get: function () { + return this._id; + }, + set: function (id) { + this._id = id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Profile.prototype, "_name", { + get: function () { + return this._name; + }, + set: function (name) { + this._name = name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Profile.prototype, "_balance", { + get: function () { + return this._balance; + }, + enumerable: true, + configurable: true + }); + return Profile; +}()); diff --git a/casinoGameApp/Profile.ts b/casinoGameApp/Profile.ts new file mode 100644 index 00000000..235e3662 --- /dev/null +++ b/casinoGameApp/Profile.ts @@ -0,0 +1,28 @@ + +namespace Casino{ + export class Profile { + private userId: number; + private userName: string; + private balance: number; + + constructor(userName: string){ + this.userId = Math.random()*100; + this.userName = userName; + this.balance = 250; + } + + public getUserId(){ + return this.userId; + } + + public getUserName(){ + return this.userName; + } + + public getUserBalance(){ + return this.balance; + } + + } +} + diff --git a/casinoGameApp/WarGame.ts b/casinoGameApp/WarGame.ts new file mode 100644 index 00000000..e69de29b diff --git a/casinoGameApp/casinoGameApp.ts b/casinoGameApp/casinoGameApp.ts new file mode 100644 index 00000000..6c4a5a7b --- /dev/null +++ b/casinoGameApp/casinoGameApp.ts @@ -0,0 +1,23 @@ +namespace Casino { + window.addEventListener("DOMContentLoaded", (e:Event)=>loadMainMenu()); + + export class Input { + private static userinput: string; + public static getInputEntered() { + var element: HTMLInputElement = document.getElementById("user_input"); + this.userinput = element.value; + element.value = ""; + } + + public static getInput(): string { + return this.userinput; + } + } + + document.getElementById("submit_button").addEventListener("click", (e: Event) => Input.getInputEntered); + + function loadMainMenu() { + var menu: MainMenu = new loadMainMenu(); + menu.menuStart(); + } +} \ No newline at end of file diff --git a/index.html b/index.html index d2c3c254..8e99a19d 100644 --- a/index.html +++ b/index.html @@ -22,10 +22,11 @@

TypeScript Casino

- +
- + + diff --git a/js/casinoGameApp.js/DeckOfCards.js b/js/casinoGameApp.js/DeckOfCards.js new file mode 100644 index 00000000..3d278ace --- /dev/null +++ b/js/casinoGameApp.js/DeckOfCards.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=DeckOfCards.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/DeckOfCards.js.map b/js/casinoGameApp.js/DeckOfCards.js.map new file mode 100644 index 00000000..b97538c9 --- /dev/null +++ b/js/casinoGameApp.js/DeckOfCards.js.map @@ -0,0 +1 @@ +{"version":3,"file":"DeckOfCards.js","sourceRoot":"","sources":["../../casinoGameApp/DeckOfCards.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/js/casinoGameApp.js/GameEngine.js b/js/casinoGameApp.js/GameEngine.js new file mode 100644 index 00000000..1ce08bb0 --- /dev/null +++ b/js/casinoGameApp.js/GameEngine.js @@ -0,0 +1,12 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +var Casino; +(function (Casino) { + var GameEngine = /** @class */ (function () { + function GameEngine() { + } + return GameEngine; + }()); + Casino.GameEngine = GameEngine; +})(Casino || (Casino = {})); +//# sourceMappingURL=GameEngine.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/GameEngine.js.map b/js/casinoGameApp.js/GameEngine.js.map new file mode 100644 index 00000000..c584a82a --- /dev/null +++ b/js/casinoGameApp.js/GameEngine.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GameEngine.js","sourceRoot":"","sources":["../../casinoGameApp/GameEngine.ts"],"names":[],"mappings":";;AAEA,IAAU,MAAM,CAYf;AAZD,WAAU,MAAM;IAIZ;QAAA;QAMI,CAAC;QAAD,iBAAC;IAAD,CAAC,AANL,IAMK;IANiB,iBAAU,aAM3B,CAAA;AAET,CAAC,EAZS,MAAM,KAAN,MAAM,QAYf"} \ No newline at end of file diff --git a/js/casinoGameApp.js/GameEngineInterface.js b/js/casinoGameApp.js/GameEngineInterface.js new file mode 100644 index 00000000..7bf9b83d --- /dev/null +++ b/js/casinoGameApp.js/GameEngineInterface.js @@ -0,0 +1,3 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +//# sourceMappingURL=GameEngineInterface.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/GameEngineInterface.js.map b/js/casinoGameApp.js/GameEngineInterface.js.map new file mode 100644 index 00000000..7550bd52 --- /dev/null +++ b/js/casinoGameApp.js/GameEngineInterface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GameEngineInterface.js","sourceRoot":"","sources":["../../casinoGameApp/GameEngineInterface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/js/casinoGameApp.js/GameInterface.js b/js/casinoGameApp.js/GameInterface.js new file mode 100644 index 00000000..f5c91cf1 --- /dev/null +++ b/js/casinoGameApp.js/GameInterface.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=GameInterface.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/GameInterface.js.map b/js/casinoGameApp.js/GameInterface.js.map new file mode 100644 index 00000000..e7c7d0a5 --- /dev/null +++ b/js/casinoGameApp.js/GameInterface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GameInterface.js","sourceRoot":"","sources":["../../casinoGameApp/GameInterface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/js/casinoGameApp.js/GoFish.js b/js/casinoGameApp.js/GoFish.js new file mode 100644 index 00000000..152bb089 --- /dev/null +++ b/js/casinoGameApp.js/GoFish.js @@ -0,0 +1,11 @@ +"use strict"; +var Casino; +(function (Casino) { + var GoFish = /** @class */ (function () { + function GoFish() { + } + return GoFish; + }()); + Casino.GoFish = GoFish; +})(Casino || (Casino = {})); +//# sourceMappingURL=GoFish.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/GoFish.js.map b/js/casinoGameApp.js/GoFish.js.map new file mode 100644 index 00000000..64fb961a --- /dev/null +++ b/js/casinoGameApp.js/GoFish.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GoFish.js","sourceRoot":"","sources":["../../casinoGameApp/GoFish.ts"],"names":[],"mappings":";AAAA,IAAU,MAAM,CAaf;AAbD,WAAU,MAAM;IACZ;QAAA;QAWA,CAAC;QAAD,aAAC;IAAD,CAAC,AAXD,IAWC;IAXY,aAAM,SAWlB,CAAA;AACL,CAAC,EAbS,MAAM,KAAN,MAAM,QAaf"} \ No newline at end of file diff --git a/js/casinoGameApp.js/GoldFish.js b/js/casinoGameApp.js/GoldFish.js new file mode 100644 index 00000000..b0411821 --- /dev/null +++ b/js/casinoGameApp.js/GoldFish.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=GoldFish.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/GoldFish.js.map b/js/casinoGameApp.js/GoldFish.js.map new file mode 100644 index 00000000..348125ed --- /dev/null +++ b/js/casinoGameApp.js/GoldFish.js.map @@ -0,0 +1 @@ +{"version":3,"file":"GoldFish.js","sourceRoot":"","sources":["../../casinoGameApp/GoldFish.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/js/casinoGameApp.js/MainMenu.js b/js/casinoGameApp.js/MainMenu.js new file mode 100644 index 00000000..8455cf13 --- /dev/null +++ b/js/casinoGameApp.js/MainMenu.js @@ -0,0 +1,35 @@ +"use strict"; +var Casino; +(function (Casino) { + var MainMenu = /** @class */ (function () { + //constructor + function MainMenu() { + this.displayElement = document.getElementById("display"); + this.submitButton = document.getElementById("submit_button"); + this.menuStart = this.menuStart.bind(this); + this.createProfile = this.createProfile.bind(this); + this.gamePicker = this.gamePicker.bind(this); + } + MainMenu.prototype.menuStart = function () { + var _this = this; + this.displayElement.innerHTML = "Enter your name here"; + this.submitButton.addEventListener("click", function (e) { return _this.createProfile(); }, { once: true }); + }; + MainMenu.prototype.createProfile = function () { + var _this = this; + this.userProfile = new Casino.Profile(Casino.Input.getInput()); + this.displayElement.innerHTML += "
Hello " + this.userProfile.getUserName() + "!"; + this.displayElement.innerHTML += "
Please select a game.
1. Slots"; + this.submitButton.addEventListener("click", function (e) { return _this.gamePicker(); }, { once: true }); + }; + MainMenu.prototype.gamePicker = function () { + if (Casino.Input.getInput().toLowerCase() === 'gofish') { + var gofishGame = new gofishGame(); + gofishGame.startGame(); + } + }; + return MainMenu; + }()); + Casino.MainMenu = MainMenu; +})(Casino || (Casino = {})); +//# sourceMappingURL=MainMenu.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/MainMenu.js.map b/js/casinoGameApp.js/MainMenu.js.map new file mode 100644 index 00000000..13c595ef --- /dev/null +++ b/js/casinoGameApp.js/MainMenu.js.map @@ -0,0 +1 @@ +{"version":3,"file":"MainMenu.js","sourceRoot":"","sources":["../../casinoGameApp/MainMenu.ts"],"names":[],"mappings":";AAAA,IAAU,MAAM,CA+Cf;AA/CD,WAAU,MAAM;IACZ;QAKI,aAAa;QACb;YALA,mBAAc,GAAgB,QAAQ,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;YACjE,iBAAY,GAAgB,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC;YAKjE,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAC3C,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnD,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjD,CAAC;QAEM,4BAAS,GAAhB;YAAA,iBAGC;YAFG,IAAI,CAAC,cAAc,CAAC,SAAS,GAAG,sBAAsB,CAAC;YACvD,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAC,UAAC,CAAQ,IAAI,OAAA,KAAI,CAAC,aAAa,EAAE,EAApB,CAAoB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;QAChG,CAAC;QAEO,gCAAa,GAArB;YAAA,iBAKC;YAJG,IAAI,CAAC,WAAW,GAAG,IAAI,OAAA,OAAO,CAAC,OAAA,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;YACjD,IAAI,CAAC,cAAc,CAAC,SAAS,IAAI,YAAY,GAAG,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,GAAG,GAAG,CAAC;YACrF,IAAI,CAAC,cAAc,CAAC,SAAS,IAAI,wCAAwC,CAAC;YAC1E,IAAI,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,CAAQ,IAAK,OAAA,KAAI,CAAC,UAAU,EAAE,EAAjB,CAAiB,EAAE,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC,CAAC;QAC/F,CAAC;QAEO,6BAAU,GAAlB;YACI,EAAE,CAAA,CAAC,OAAA,KAAK,CAAC,QAAQ,EAAE,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,CAAA,CAAC;gBAC5C,IAAI,UAAU,GAAG,IAAI,UAAU,EAAE,CAAC;gBAClC,UAAU,CAAC,SAAS,EAAE,CAAC;YAC3B,CAAC;QACL,CAAC;QAgBL,eAAC;IAAD,CAAC,AA7CD,IA6CC;IA7CY,eAAQ,WA6CpB,CAAA;AACL,CAAC,EA/CS,MAAM,KAAN,MAAM,QA+Cf"} \ No newline at end of file diff --git a/js/casinoGameApp.js/Player.js b/js/casinoGameApp.js/Player.js new file mode 100644 index 00000000..af86efc5 --- /dev/null +++ b/js/casinoGameApp.js/Player.js @@ -0,0 +1,25 @@ +"use strict"; +var Casino; +(function (Casino) { + var Player = /** @class */ (function () { + //constructor + function Player(playerProfile) { + this.playerProfile = playerProfile; + } + //represents a player within the context of a game + //should cease to exist upon termination of a game. - HOW? + //player should implement playerinterface - done + //player objecs should be created within the context of a game. + Player.prototype.getProfile = function () { + return this.playerProfile; + }; + Player.prototype.getName = function () { + return this.playerProfile.getUserName(); + }; + Player.prototype.getId = function () { + return this.playerProfile.getUserId(); + }; + return Player; + }()); +})(Casino || (Casino = {})); +//# sourceMappingURL=Player.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/Player.js.map b/js/casinoGameApp.js/Player.js.map new file mode 100644 index 00000000..cfef2cab --- /dev/null +++ b/js/casinoGameApp.js/Player.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Player.js","sourceRoot":"","sources":["../../casinoGameApp/Player.ts"],"names":[],"mappings":";AAAA,IAAU,MAAM,CA2Bf;AA3BD,WAAU,MAAM;IACZ;QAGI,aAAa;QACb,gBAAY,aAAsB;YAC9B,IAAI,CAAC,aAAa,GAAG,aAAa,CAAC;QACvC,CAAC;QAEL,kDAAkD;QAClD,0DAA0D;QAE1D,gDAAgD;QAChD,gEAAgE;QAE5D,2BAAU,GAAV;YACI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QAC9B,CAAC;QACD,wBAAO,GAAP;YACI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,CAAC;QAC5C,CAAC;QACD,sBAAK,GAAL;YACI,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,SAAS,EAAE,CAAC;QAC1C,CAAC;QAGL,aAAC;IAAD,CAAC,AAzBD,IAyBC;AACL,CAAC,EA3BS,MAAM,KAAN,MAAM,QA2Bf"} \ No newline at end of file diff --git a/js/casinoGameApp.js/PlayerInterface.js b/js/casinoGameApp.js/PlayerInterface.js new file mode 100644 index 00000000..07a2ef6a --- /dev/null +++ b/js/casinoGameApp.js/PlayerInterface.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=PlayerInterface.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/PlayerInterface.js.map b/js/casinoGameApp.js/PlayerInterface.js.map new file mode 100644 index 00000000..2b6c62f6 --- /dev/null +++ b/js/casinoGameApp.js/PlayerInterface.js.map @@ -0,0 +1 @@ +{"version":3,"file":"PlayerInterface.js","sourceRoot":"","sources":["../../casinoGameApp/PlayerInterface.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/js/casinoGameApp.js/Profile.js b/js/casinoGameApp.js/Profile.js new file mode 100644 index 00000000..6c11009a --- /dev/null +++ b/js/casinoGameApp.js/Profile.js @@ -0,0 +1,23 @@ +"use strict"; +var Casino; +(function (Casino) { + var Profile = /** @class */ (function () { + function Profile(userName) { + this.userId = Math.random() * 100; + this.userName = userName; + this.balance = 250; + } + Profile.prototype.getUserId = function () { + return this.userId; + }; + Profile.prototype.getUserName = function () { + return this.userName; + }; + Profile.prototype.getUserBalance = function () { + return this.balance; + }; + return Profile; + }()); + Casino.Profile = Profile; +})(Casino || (Casino = {})); +//# sourceMappingURL=Profile.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/Profile.js.map b/js/casinoGameApp.js/Profile.js.map new file mode 100644 index 00000000..7f172ba6 --- /dev/null +++ b/js/casinoGameApp.js/Profile.js.map @@ -0,0 +1 @@ +{"version":3,"file":"Profile.js","sourceRoot":"","sources":["../../casinoGameApp/Profile.ts"],"names":[],"mappings":";AACA,IAAU,MAAM,CAyBf;AAzBD,WAAU,MAAM;IACZ;QAKI,iBAAY,QAAgB;YACxB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,EAAE,GAAC,GAAG,CAAC;YAChC,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;YACzB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;QACtB,CAAC;QAEK,2BAAS,GAAhB;YACA,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC;QACnB,CAAC;QAEM,6BAAW,GAAlB;YACA,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrB,CAAC;QAEM,gCAAc,GAArB;YACA,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACpB,CAAC;QAEL,cAAC;IAAD,CAAC,AAvBD,IAuBC;IAvBY,cAAO,UAuBnB,CAAA;AACL,CAAC,EAzBS,MAAM,KAAN,MAAM,QAyBf"} \ No newline at end of file diff --git a/js/casinoGameApp.js/casinoGameApp.js b/js/casinoGameApp.js/casinoGameApp.js new file mode 100644 index 00000000..a7134ba0 --- /dev/null +++ b/js/casinoGameApp.js/casinoGameApp.js @@ -0,0 +1,25 @@ +"use strict"; +var Casino; +(function (Casino) { + window.addEventListener("DOMContentLoaded", function (e) { return loadMainMenu(); }); + var Input = /** @class */ (function () { + function Input() { + } + Input.getInputEntered = function () { + var element = document.getElementById("user_input"); + this.userinput = element.value; + element.value = ""; + }; + Input.getInput = function () { + return this.userinput; + }; + return Input; + }()); + Casino.Input = Input; + document.getElementById("submit_button").addEventListener("click", function (e) { return Input.getInputEntered; }); + function loadMainMenu() { + var menu = new loadMainMenu(); + menu.menuStart(); + } +})(Casino || (Casino = {})); +//# sourceMappingURL=casinoGameApp.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/casinoGameApp.js.map b/js/casinoGameApp.js/casinoGameApp.js.map new file mode 100644 index 00000000..98bf47fa --- /dev/null +++ b/js/casinoGameApp.js/casinoGameApp.js.map @@ -0,0 +1 @@ +{"version":3,"file":"casinoGameApp.js","sourceRoot":"","sources":["../../casinoGameApp/casinoGameApp.ts"],"names":[],"mappings":";AAAA,IAAU,MAAM,CAsBf;AAtBD,WAAU,MAAM;IACZ,MAAM,CAAC,gBAAgB,CAAC,kBAAkB,EAAE,UAAC,CAAO,IAAG,OAAA,YAAY,EAAE,EAAd,CAAc,CAAC,CAAC;IAEvE;QAAA;QAWA,CAAC;QATiB,qBAAe,GAA7B;YACI,IAAI,OAAO,GAAuC,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC;YACxF,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,KAAK,CAAC;YAC/B,OAAO,CAAC,KAAK,GAAG,EAAE,CAAC;QACvB,CAAC;QAEa,cAAQ,GAAtB;YACI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;QACL,YAAC;IAAD,CAAC,AAXD,IAWC;IAXY,YAAK,QAWjB,CAAA;IAED,QAAQ,CAAC,cAAc,CAAC,eAAe,CAAC,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,CAAQ,IAAK,OAAA,KAAK,CAAC,eAAe,EAArB,CAAqB,CAAC,CAAC;IAExG;QACI,IAAI,IAAI,GAAa,IAAI,YAAY,EAAE,CAAC;QACxC,IAAI,CAAC,SAAS,EAAE,CAAC;IACrB,CAAC;AACL,CAAC,EAtBS,MAAM,KAAN,MAAM,QAsBf"} \ No newline at end of file diff --git a/js/casinoGameApp.js/warGame.js b/js/casinoGameApp.js/warGame.js new file mode 100644 index 00000000..7aad113d --- /dev/null +++ b/js/casinoGameApp.js/warGame.js @@ -0,0 +1,2 @@ +"use strict"; +//# sourceMappingURL=WarGame.js.map \ No newline at end of file diff --git a/js/casinoGameApp.js/warGame.js.map b/js/casinoGameApp.js/warGame.js.map new file mode 100644 index 00000000..8973b958 --- /dev/null +++ b/js/casinoGameApp.js/warGame.js.map @@ -0,0 +1 @@ +{"version":3,"file":"WarGame.js","sourceRoot":"","sources":["../../casinoGameApp/WarGame.ts"],"names":[],"mappings":""} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..245f03a5 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */ + "strict": true, /* Enable all strict type-checking options. */ + "noImplicitAny": false, + "sourceMap": true, + "watch": true, + "outDir": "js/casinoGameApp.js" + } + +} \ No newline at end of file