diff --git a/.idea/CR-MacroLabs-TypeScript-Casino.iml b/.idea/CR-MacroLabs-TypeScript-Casino.iml
new file mode 100644
index 00000000..24643cc3
--- /dev/null
+++ b/.idea/CR-MacroLabs-TypeScript-Casino.iml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 00000000..80be8c1e
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 00000000..94a25f7f
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 00000000..e75a445f
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,419 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1521992006893
+
+
+ 1521992006893
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/BlackJack.ts b/app/BlackJack.ts
new file mode 100644
index 00000000..f1b421cd
--- /dev/null
+++ b/app/BlackJack.ts
@@ -0,0 +1,13 @@
+import CardDeck from "./CardDeck";
+import Player from "./Player"
+
+class BlackJack {
+ private bjdeck = new CardDeck;
+ private player = new Player;
+ private dealer = new Player;
+
+}
+
+function dealFirstCards{
+
+}
diff --git a/app/Card.ts b/app/Card.ts
new file mode 100644
index 00000000..c6d24990
--- /dev/null
+++ b/app/Card.ts
@@ -0,0 +1,17 @@
+import CardRank from "./CardRank";
+import CardSuit from "./CardSuit";
+
+class Card {
+ suit: CardSuit;
+ rank: CardRank;
+
+ constructor(suit: CardSuit, rank: CardRank) {
+ this.suit = suit;
+ this.rank = rank;
+ }
+
+ toString(): string {
+ return CardRank[this.rank] + " of " + CardSuit[this.suit];
+ }
+
+}
diff --git a/app/CardDeck.ts b/app/CardDeck.ts
new file mode 100644
index 00000000..33be26b6
--- /dev/null
+++ b/app/CardDeck.ts
@@ -0,0 +1,25 @@
+import Card from "./Card";
+
+class CardDeck {
+ private deck: Card[];
+
+ public constructor() {
+ this.deck = [];
+
+ for (let suit = 0; suit < 4; suit++) {
+ for (let rank = 1; rank < 14 ; rank ++) {
+ this.deck.push(new Card(rank, suit));
+ }
+ }
+ }
+
+
+ shuffle(): void {
+ for (let i = this.deck.length - 1; i > 0; i--) {
+ let j = Math.floor(Math.random() * (i + 1));
+ let swap = this.deck[i];
+ this.deck[i] = this.deck[i];
+ this.deck[j] = swap;
+ }
+ }
+}
diff --git a/app/CardRank.ts b/app/CardRank.ts
new file mode 100644
index 00000000..77703c92
--- /dev/null
+++ b/app/CardRank.ts
@@ -0,0 +1,15 @@
+enum CardRank {
+ two,
+ three,
+ four,
+ five,
+ six,
+ seven,
+ eight,
+ nine,
+ ten,
+ jack,
+ queen,
+ king,
+ Ace,
+}
\ No newline at end of file
diff --git a/app/CardSuit.ts b/app/CardSuit.ts
new file mode 100644
index 00000000..8068e3c7
--- /dev/null
+++ b/app/CardSuit.ts
@@ -0,0 +1,6 @@
+enum CardSuit {
+ Clubs,
+ Diamonds,
+ Hearts,
+ Spades
+}
\ No newline at end of file
diff --git a/app/Gamble.ts b/app/Gamble.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/app/Player.ts b/app/Player.ts
new file mode 100644
index 00000000..36698955
--- /dev/null
+++ b/app/Player.ts
@@ -0,0 +1,13 @@
+import Card from "./Card"
+class Player {
+ private name: string;
+ private cardHand: Card[];
+
+ constructor(){
+ this.name = name;
+ this.cardHand = cardHand;
+ }
+
+
+
+}
\ No newline at end of file
diff --git a/app/PlayerInterface.ts b/app/PlayerInterface.ts
new file mode 100644
index 00000000..21ad86f9
--- /dev/null
+++ b/app/PlayerInterface.ts
@@ -0,0 +1,3 @@
+interface PlayerInterface {
+
+}
\ No newline at end of file
diff --git a/app/Profile.ts b/app/Profile.ts
new file mode 100644
index 00000000..e69de29b
diff --git a/app/app.ts b/app/app.ts
new file mode 100644
index 00000000..eff2bd42
--- /dev/null
+++ b/app/app.ts
@@ -0,0 +1,37 @@
+class app {
+
+ public static main():void{
+ UserInterfaceClass.display("Welcome to BlackJack!!! Enter your name in the text field below the display window and click submit.");
+
+ }
+
+}
+class UserInterfaceClass {
+
+ static userInput = document.getElementById("user_input");
+ static window = document.getElementById('display');
+ static button = document.getElementById('submit');
+ static _lastInput: any;
+ private static _instance: UserInterfaceClass
+
+ private constructor() {
+ UserInterfaceClass.button.addEventListener("click", (e: Event) => { UserInterfaceClass._lastInput = UserInterfaceClass.userInput.value });
+ UserInterfaceClass.button.addEventListener("click", (e: Event) => { UserInterfaceClass.userInput.value = '' })
+ }
+
+ static display(input: string): void {
+ this.window.innerText += input + '\n';
+ }
+
+ static clearScreen(): void {
+ this.window.innerText = '';
+ }
+
+ public static get Instance(): UserInterfaceClass {
+ return this._instance || (this._instance = new UserInterfaceClass());
+ }
+
+ public static get lastInput(): any {
+ return this._lastInput;
+ }
+}
diff --git a/app/tsconfig.json b/app/tsconfig.json
new file mode 100644
index 00000000..fd8c768a
--- /dev/null
+++ b/app/tsconfig.json
@@ -0,0 +1,12 @@
+{
+ "extends": "../tsconfig.base",
+ "compilerOptions": {
+ "removeComments": true,
+ "module": "commonjs",
+ "moduleResolution": "node",
+ "traceResolution": false,
+ },
+ "files": [
+ "*/**.ts"
+ ]
+}
diff --git a/index.html b/index.html
index d2c3c254..a10cc21f 100644
--- a/index.html
+++ b/index.html
@@ -22,10 +22,21 @@ TypeScript Casino
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+