diff --git a/Casino/app.ts b/Casino/app.ts new file mode 100644 index 00000000..e61220ab --- /dev/null +++ b/Casino/app.ts @@ -0,0 +1,275 @@ +class App { + public static main(): void{ + var profile = new Profile(123,"Bob", 100); + var newPlayer = new Player(profile); + var mainMenu = new MainMenu; + var craps : Craps = new Craps(newPlayer) + mainMenu.start(); + + } +} +class UI{ + static textBox = document.getElementById("user_input"); + static displayWindow = document.getElementById('display'); + static submitButton = document.getElementById('submit'); + static actualUserInput: any; + private static instance: UI; + + private constructor() { + UI.submitButton.addEventListener("click", (e: Event) => { UI.actualUserInput = UI.textBox.value }); + UI.submitButton.addEventListener("click", (e: Event) => { UI.textBox.value = '' }); + } + + static display(input: string): void { + this.displayWindow.innerText += input + '\n'; + } + + static clearScreen(): void { + this.displayWindow.innerText = ''; + } + + public static get Instance(): UI { + return this.instance || (this.instance = new UI()); + } + + public static get lastInput(): any { + return this.actualUserInput; + } +} + +class Craps{ + setOfDice: Dice; + crapsPlayer: Player; + betAmount: any; + betUserPlaces: any; + rollValue: number; + + constructor(player: Player){ + this.crapsPlayer = player; + this.userPlacesBet = this.userPlacesBet.bind(this); + } + + userPlacesBet(){ + UI.submitButton.removeEventListener("click", this.userPlacesBet); + if (UI.lastInput === "Pass Line"){ + this.passLineBetTurnSequence(this.rollValue); + } else if(UI.lastInput === "Don't Pass Line"){ + this.dontPassLineBetTurnSequence(this.rollValue) + } + UI.clearScreen(); + } + + userBetAmount(){ + UI.display("Please enter your bet amount down below"); + if(this.betAmount > this.crapsPlayer.getBalance()){ + UI.display("You can't bet that much!"); + } else{ + this.betAmount = UI.lastInput(); + } + UI.clearScreen(); + } + + addDiceTogether(): number{ + UI.display("Rolling Dice"); + this.rollValue = this.setOfDice.rollDice() + this.setOfDice.rollDice(); + return this.rollValue; + } + + passLineBetTurnSequence(rollValue: number): void { + if (rollValue === 7 || rollValue === 11) { + this.playerWins(); + } else if (rollValue === 2 || rollValue === 3 || rollValue === 12) { + this.playerLoses(); + } else { + this.passLineBetRollsNonWinOrLoseNumber(rollValue); + } + } + + passLineBetRollsNonWinOrLoseNumber(rollValue: number): void { + let currentRoll= 0; + do { + currentRoll = this.addDiceTogether(); + + if (currentRoll === 7) { + this.playerLoses(); + break; + + } else if (currentRoll === this.rollValue) { + + this.playerWins(); + break; + } + } while (currentRoll !== 7 || currentRoll !== this.rollValue); + + } + + + dontPassLineBetTurnSequence(rollValue: number): void { + if (rollValue == 2 || rollValue == 3) { + this.playerWins(); + } else if (rollValue == 7 || rollValue == 11) { + this.playerLoses(); + } else { + this.dontPassLineBetRollNonWinLoseNumber(rollValue); + } + } + dontPassLineBetRollNonWinLoseNumber(rollValue: number) { + let currentRoll = 0; + do { + currentRoll = this.addDiceTogether(); + + if (rollValue === 7) { + this.playerWins(); + break; + } else if (currentRoll === rollValue) { + this.playerLoses(); + break; + } + } while (currentRoll !== 7 || currentRoll !== rollValue); + + } + + playerWins(){ + UI.display("You Win!"); + } + + playerLoses(){ + UI.display("You Lose!"); + } + + willUserPlayAgain(){ + UI.display("Do you want to play again? Y/N") + } + startGame(){ + UI.display("Hello! Please enter in Pass Line or Don't Pass Line for you bet below"); + UI.submitButton.addEventListener("click", this.userPlacesBet); + this.rollValue = this.addDiceTogether(); + this.userPlacesBet(); + } +} + +class Dice{ + sides = 6; + rollDice(){ + var randNumber = Math.floor(Math.random()* this.sides) + 1; + return randNumber; + } +} + +class MainMenu{ + mainPlayer: Player; + newCrapsGame = new Craps(this.mainPlayer); + constructor(){ + this.chooseGame = this.chooseGame.bind(this); + } + + start() { + UI.display("What game do you want to play?"); + UI.display("Craps or Craps?"); + UI.submitButton.addEventListener("click", this.chooseGame); + } + + chooseGame(): void { + UI.submitButton.removeEventListener("click", this.chooseGame); + if (UI.lastInput === "Craps") { + this.newCrapsGame.startGame(); + + } else { + UI.display("Ok, that's cool. Good Bye!"); + } + } + + +} + +class Player implements PlayerInterface { + + private playerProfile: Profile; + + constructor(profile: Profile){ + this.playerProfile = profile; + } + getProfile(): Profile { + return this.playerProfile; + } + getName(): string { + return this.playerProfile.getName; + } + getId(): number { + return this.playerProfile.getId; + } + + getBalance(): number{ + return this.playerProfile.getBalance; + } +} + +interface PlayerInterface{ + getProfile(): Profile; + getName(): string; + getId(): number; +} + +class Profile{ + private id: number; + private name: string; + private balance: number; + + public listOfProfiles: Profile[]; + + constructor(id, name, balance){ + this.id = id; + this.name = name; + this.balance = balance; + } + get getName(){ + return this.name; + } + + get getId(){ + return this.id; + } + + get getBalance(){ + return this.balance; + } + + set setId(id){ + this.id = id; + } + + set setName(name){ + this.name = name; + } + + set setBalance(balance){ + this.balance = balance; + } + + public addProfile(profile: Profile): void{ + this.listOfProfiles.push(profile); + } + +} + +class Wallet{ + private balance: number; + + constructor(){ + this.balance = 0; + } + + get Balance(){ + return this.balance; + } + + add(money: number): void{ + this.balance =+ money; + } + + subtract(money: number){ + this.balance =+ money; + } +} +const instance = UI.Instance; +App.main(); diff --git a/index.html b/index.html index d2c3c254..c9756993 100644 --- a/index.html +++ b/index.html @@ -22,10 +22,10 @@

TypeScript Casino

- +
- - + + diff --git a/js/app.js b/js/app.js new file mode 100644 index 00000000..ec493bb0 --- /dev/null +++ b/js/app.js @@ -0,0 +1,263 @@ +var App = /** @class */ (function () { + function App() { + } + App.main = function () { + var profile = new Profile(123, "Bob", 100); + var newPlayer = new Player(profile); + var mainMenu = new MainMenu; + var craps = new Craps(newPlayer); + mainMenu.start(); + }; + return App; +}()); +var UI = /** @class */ (function () { + function UI() { + UI.submitButton.addEventListener("click", function (e) { UI.actualUserInput = UI.textBox.value; }); + UI.submitButton.addEventListener("click", function (e) { UI.textBox.value = ''; }); + } + UI.display = function (input) { + this.displayWindow.innerText += input + '\n'; + }; + UI.clearScreen = function () { + this.displayWindow.innerText = ''; + }; + Object.defineProperty(UI, "Instance", { + get: function () { + return this.instance || (this.instance = new UI()); + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(UI, "lastInput", { + get: function () { + return this.actualUserInput; + }, + enumerable: true, + configurable: true + }); + UI.textBox = document.getElementById("user_input"); + UI.displayWindow = document.getElementById('display'); + UI.submitButton = document.getElementById('submit'); + return UI; +}()); +var Craps = /** @class */ (function () { + function Craps(player) { + this.crapsPlayer = player; + this.userPlacesBet = this.userPlacesBet.bind(this); + } + Craps.prototype.userPlacesBet = function () { + UI.submitButton.removeEventListener("click", this.userPlacesBet); + if (UI.lastInput === "Pass Line") { + this.passLineBetTurnSequence(this.rollValue); + } + else if (UI.lastInput === "Don't Pass Line") { + this.dontPassLineBetTurnSequence(this.rollValue); + } + UI.clearScreen(); + }; + Craps.prototype.userBetAmount = function () { + UI.display("Please enter your bet amount down below"); + if (this.betAmount > this.crapsPlayer.getBalance()) { + UI.display("You can't bet that much!"); + } + else { + this.betAmount = UI.lastInput(); + } + UI.clearScreen(); + }; + Craps.prototype.addDiceTogether = function () { + UI.display("Rolling Dice"); + this.rollValue = this.setOfDice.rollDice() + this.setOfDice.rollDice(); + return this.rollValue; + }; + Craps.prototype.passLineBetTurnSequence = function (rollValue) { + if (rollValue === 7 || rollValue === 11) { + this.playerWins(); + } + else if (rollValue === 2 || rollValue === 3 || rollValue === 12) { + this.playerLoses(); + } + else { + this.passLineBetRollsNonWinOrLoseNumber(rollValue); + } + }; + Craps.prototype.passLineBetRollsNonWinOrLoseNumber = function (rollValue) { + var currentRoll = 0; + do { + currentRoll = this.addDiceTogether(); + if (currentRoll === 7) { + this.playerLoses(); + break; + } + else if (currentRoll === this.rollValue) { + this.playerWins(); + break; + } + } while (currentRoll !== 7 || currentRoll !== this.rollValue); + }; + Craps.prototype.dontPassLineBetTurnSequence = function (rollValue) { + if (rollValue == 2 || rollValue == 3) { + this.playerWins(); + } + else if (rollValue == 7 || rollValue == 11) { + this.playerLoses(); + } + else { + this.dontPassLineBetRollNonWinLoseNumber(rollValue); + } + }; + Craps.prototype.dontPassLineBetRollNonWinLoseNumber = function (rollValue) { + var currentRoll = 0; + do { + currentRoll = this.addDiceTogether(); + if (rollValue === 7) { + this.playerWins(); + break; + } + else if (currentRoll === rollValue) { + this.playerLoses(); + break; + } + } while (currentRoll !== 7 || currentRoll !== rollValue); + }; + Craps.prototype.playerWins = function () { + UI.display("You Win!"); + }; + Craps.prototype.playerLoses = function () { + UI.display("You Lose!"); + }; + Craps.prototype.willUserPlayAgain = function () { + UI.display("Do you want to play again? Y/N"); + }; + Craps.prototype.startGame = function () { + UI.display("Hello! Please enter in Pass Line or Don't Pass Line for you bet below"); + UI.submitButton.addEventListener("click", this.userPlacesBet); + this.rollValue = this.addDiceTogether(); + this.userPlacesBet(); + }; + return Craps; +}()); +var Dice = /** @class */ (function () { + function Dice() { + this.sides = 6; + } + Dice.prototype.rollDice = function () { + var randNumber = Math.floor(Math.random() * this.sides) + 1; + return randNumber; + }; + return Dice; +}()); +var MainMenu = /** @class */ (function () { + function MainMenu() { + this.newCrapsGame = new Craps(this.mainPlayer); + this.chooseGame = this.chooseGame.bind(this); + } + MainMenu.prototype.start = function () { + UI.display("What game do you want to play?"); + UI.display("Craps or Craps?"); + UI.submitButton.addEventListener("click", this.chooseGame); + }; + MainMenu.prototype.chooseGame = function () { + UI.submitButton.removeEventListener("click", this.chooseGame); + if (UI.lastInput === "Craps") { + this.newCrapsGame.startGame(); + } + else { + UI.display("Ok, that's cool. Good Bye!"); + } + }; + return MainMenu; +}()); +var Player = /** @class */ (function () { + function Player(profile) { + this.playerProfile = profile; + } + Player.prototype.getProfile = function () { + return this.playerProfile; + }; + Player.prototype.getName = function () { + return this.playerProfile.getName; + }; + Player.prototype.getId = function () { + return this.playerProfile.getId; + }; + Player.prototype.getBalance = function () { + return this.playerProfile.getBalance; + }; + return Player; +}()); +var Profile = /** @class */ (function () { + function Profile(id, name, balance) { + this.id = id; + this.name = name; + this.balance = balance; + } + Object.defineProperty(Profile.prototype, "getName", { + get: function () { + return this.name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Profile.prototype, "getId", { + get: function () { + return this.id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Profile.prototype, "getBalance", { + get: function () { + return this.balance; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Profile.prototype, "setId", { + set: function (id) { + this.id = id; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Profile.prototype, "setName", { + set: function (name) { + this.name = name; + }, + enumerable: true, + configurable: true + }); + Object.defineProperty(Profile.prototype, "setBalance", { + set: function (balance) { + this.balance = balance; + }, + enumerable: true, + configurable: true + }); + Profile.prototype.addProfile = function (profile) { + this.listOfProfiles.push(profile); + }; + return Profile; +}()); +var Wallet = /** @class */ (function () { + function Wallet() { + this.balance = 0; + } + Object.defineProperty(Wallet.prototype, "Balance", { + get: function () { + return this.balance; + }, + enumerable: true, + configurable: true + }); + Wallet.prototype.add = function (money) { + this.balance = +money; + }; + Wallet.prototype.subtract = function (money) { + this.balance = +money; + }; + return Wallet; +}()); +var instance = UI.Instance; +App.main(); +//# sourceMappingURL=app.js.map \ No newline at end of file diff --git a/js/app.js.map b/js/app.js.map new file mode 100644 index 00000000..09bd78b9 --- /dev/null +++ b/js/app.js.map @@ -0,0 +1 @@ +{"version":3,"file":"app.js","sourceRoot":"","sources":["../Casino/app.ts"],"names":[],"mappings":"AAAA;IAAA;IASA,CAAC;IARgB,QAAI,GAAlB;QACG,IAAI,OAAO,GAAG,IAAI,OAAO,CAAC,GAAG,EAAC,KAAK,EAAE,GAAG,CAAC,CAAC;QAC1C,IAAK,SAAS,GAAG,IAAI,MAAM,CAAC,OAAO,CAAC,CAAC;QACrC,IAAI,QAAQ,GAAG,IAAI,QAAQ,CAAC;QAC5B,IAAI,KAAK,GAAW,IAAI,KAAK,CAAC,SAAS,CAAC,CAAA;QACxC,QAAQ,CAAC,KAAK,EAAE,CAAC;IAEpB,CAAC;IACJ,UAAC;AAAD,CAAC,AATD,IASC;AACD;IAOQ;QACI,EAAE,CAAC,YAAY,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAC,CAAQ,IAAO,EAAE,CAAC,eAAe,GAAG,EAAE,CAAC,OA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aAAX;YACI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC;;;OAAA;IAED,sBAAI,0BAAK;aAAT;YACI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;QACnB,CAAC;;;OAAA;IAED,sBAAI,+BAAU;aAAd;YACI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;;;OAAA;IAED,sBAAI,0BAAK;aAAT,UAAU,EAAE;YACR,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACjB,CAAC;;;OAAA;IAED,sBAAI,4BAAO;aAAX,UAAY,IAAI;YACZ,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACrB,CAAC;;;OAAA;IAED,sBAAI,+BAAU;aAAd,UAAe,OAAO;YAClB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAC;QAC3B,CAAC;;;OAAA;IAEM,4BAAU,GAAjB,UAAkB,OAAgB;QAC9B,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,CAAC;IAEN,cAAC;AAAD,CAAC,AAxCD,IAwCC;AAED;IAGI;QACQ,IAAI,CAAC,OAAO,GAAG,CAAC,CAAC;IACzB,CAAC;IAED,sBAAI,2BAAO;aAAX;YACI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC;QACxB,CAAC;;;OAAA;IAED,oBAAG,GAAH,UAAI,KAAa;QAChB,IAAI,CAAC,OAAO,GAAE,CAAE,KAAK,CAAC;IACvB,CAAC;IAED,yBAAQ,GAAR,UAAS,KAAa;QAClB,IAAI,CAAC,OAAO,GAAE,CAAE,KAAK,CAAC;IAC1B,CAAC;IACL,aAAC;AAAD,CAAC,AAlBD,IAkBC;AACD,IAAM,QAAQ,GAAG,EAAE,CAAC,QAAQ,CAAC;AAC7B,GAAG,CAAC,IAAI,EAAE,CAAC"} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 00000000..a057ab17 --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compileOnSave": true, + "compilerOptions": { + "noImplicitAny": false, + "outDir": "js", + "target": "es5", + "watch": true, + "module": "commonjs", + "sourceMap": true + } +} \ No newline at end of file