-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvisuals.html
117 lines (105 loc) · 5.64 KB
/
visuals.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html ng-app="MachiKoroSimul">
<head>
<title>Machi Koro Simulation</title>
<meta charset="utf-8" />
<!-- CDN-hosted CSS libraries -->
<link rel="stylesheet"
href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"
integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u"
crossorigin="anonymous" />
<link rel="stylesheet" href="css/visuals.css" />
</head>
<body data-ng-controller="MachiKoroCtrl as game" data-ng-init="onLoad(game)">
<div id="main-container">
<div id="dice-container" data-ng-class="{ newDice: animateDice }">
<span data-ng-if="game.lastRoll !== null" data-ng-cloak>
<img class="dice-img"
data-ng-src="images/dice/dice-{{ game.lastRoll[0] }}.png"
alt="First Die {{ game.lastRoll[0] }}" />
<img class="dice-img" data-ng-if="game.lastRoll.length > 1"
data-ng-src="images/dice/dice-{{ game.lastRoll[1] }}.png"
alt="Second Die {{ game.lastRoll[1] }}" />
</span>
</div>
<div id="deck-container" data-ng-cloak>
<h4 class="section-title">Deck</h4>
<div class="card vis-card" data-ng-repeat="cardName in getDeck(game)">
<img class="card-img selectable-card" data-ng-src="images/cards/{{ cardName.toLowerCase() }}.png" alt="{{ getCardDescription(cardName) }}"
data-ng-class="{ disabled: (!game.canBuyCard(cardName, game.getCurrentPlayer()) || !game.getCurrentPlayer().isHuman) }"
data-ng-click="game.buyCard(cardName, game.getCurrentPlayer())" />
<div class="card-name">
<span>{{ getDeckQty(game, cardName) }} x</span>
<span>{{ getCardName(cardName) }}</span>
</div>
</div>
</div>
<div id="player-container" data-ng-cloak>
<div class="player" data-ng-repeat="player in game.players" id="{{ player.name }}"
data-ng-class="{ playerTurn: game.isPlayerTurn(player) }">
<div class="player-name" data-ng-class="{ playerTurn: game.isPlayerTurn(player) }">
<span>{{ player.name }} ({{ player.isHuman ? "Human": "AI" }})</span><!--
<div>E[1, myTurn] = {{ game.getPlayerExpectedValueYourTurn(player)[1] }}</div>
<div>E[1, allTurns] = {{ game.getPlayerExpectedValueAllTurns(player)[1] }}</div>
<div>E[2, myTurn] = {{ game.getPlayerExpectedValueYourTurn(player)[2] }}</div>
<div>E[2, allTurns] = {{ game.getPlayerExpectedValueAllTurns(player)[2] }}</div> -->
</div>
<div class="plus-money" data-ng-show="plusMoney[player.name]"
data-ng-class="{ fadeOut: plusMoney[player.name] }">+{{ plusMoney[player.name] }}</div>
<div class="minus-money" data-ng-show="minusMoney[player.name]"
data-ng-class="{ fadeOut: minusMoney[player.name] }">-{{ minusMoney[player.name] }}</div>
<div class="player-money">Money: {{ player.money }}</div>
<div class="player-cards">
<div data-ng-repeat="cardName in getSortedPlayerCards(player)" class="card vis-card">
<img class="card-img" data-ng-src="images/cards/{{ cardName.toLowerCase() }}.png" alt="{{ getCardDescription(cardName) }}" />
<div class="card-name">
<span>{{ getCardQty(cardName, player) }} x</span>
<span>{{ getCardName (cardName) }}</span>
</div>
<div class="card-yield">
<span>Yields {{ game.getCardYield(player, cardName) ? game.getCardYield(player, cardName).amt : "nothing" }}</span>
<!-- <div>E[1, myTurn] = {{ game.getCardExpectedValueYourTurn(player, cardName)["1"] }}</div>
<div>E[1, allTurns] = {{ game.getCardExpectedValueAllTurns(player, cardName)["1"] }}</div>
<div>E[2, myTurn] = {{ game.getCardExpectedValueYourTurn(player, cardName)["2"] }}</div>
<div>E[2, allTurns] = {{ game.getCardExpectedValueAllTurns(player, cardName)["2"] }}</div> -->
</div>
</div>
</div>
<div class="player-after"></div>
</div>
</div>
<div id="btn-panel" data-ng-cloak>
<span data-ng-show="game.getCurrentPlayer().isHuman" class="human-panel">
<button class="btn btn-primary" data-ng-click="game.rollDice(1)" data-ng-show="game.state === 'ROLL'"
data-ng-disabled="game.state !== 'ROLL'">Roll 1 Die</button>
<button class="btn btn-primary" data-ng-click="game.rollDice(2)" data-ng-show="game.state === 'ROLL'"
data-ng-disabled="game.state !== 'ROLL' || !game.getCurrentPlayer().canRollTwoDice()">Roll 2 Dice</button>
<button class="btn btn-danger" data-ng-click="endHumanTurn(game)" data-ng-show="game.state === 'BUY'"
data-ng-disabled="game.state !== 'BUY'">End Turn</button>
</span>
<span data-ng-hide="game.getCurrentPlayer().isHuman" class="bot-panel">
<button class="btn btn-primary" data-ng-click="doTurn(game)"
data-ng-disabled="game.state !== 'ROLL' || animateDice">Evaluate {{ game.getCurrentPlayer().name }}'s Turn</button>
</span>
<button class="btn btn-info" data-ng-click="newGame(game)">New Game</button>
</div>
<div id="game-over" data-ng-show="game.state === 'GAME_OVER'"
data-ng-class="{ gameOver : game.state === 'GAME_OVER' }" data-ng-cloak>Game Over</div>
</div>
<footer data-ng-cloak>Turn {{ game.turn + 1 }}</footer>
<!-- CDN-hosted libraries -->
<script
src="https://code.jquery.com/jquery-3.3.1.min.js"
integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8="
crossorigin="anonymous"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.6.5/angular.min.js"
integrity="sha256-zBy1l2WBAh2vPF8rnjFMUXujsfkKjya0Jy5j6yKj0+Q="
crossorigin="anonymous"></script>
<script src="js/utils.js"></script>
<script src="js/cards.js"></script>
<script src="js/player.js"></script>
<script src="js/machi_koro_ctrl.js"></script>
<script src="js/angular_loader.js"></script>
</body>
</html>