This commit is contained in:
2025-01-24 10:22:13 -08:00
commit fc0a446b01
107 changed files with 3251 additions and 0 deletions

View File

@ -0,0 +1,31 @@
<h1>Game History</h1>
<% if @recent_games.any? %>
<div class="wrapper">
<div class="table">
<div class="row header">
<div class="cell">Time</div>
<div class="cell">Wager</div>
<div class="cell">Winner</div>
<div class="cell">High Roll</div>
<div class="cell">Loser</div>
<div class="cell">Low Roll</div>
<div class="cell">Payout</div>
</div>
<% @recent_games.each do |game| %>
<div class="row">
<div class="cell" data-title="Time"><%= Time.at(game.timestamp).strftime("%Y-%m-%d %H:%M:%S") %></div>
<div class="cell" data-title="Wager"><%= game.wager %></div>
<div class="cell" data-title="Winner"><%= game.winner %></div>
<div class="cell" data-title="High Roll"><%= game.high_roll %></div>
<div class="cell" data-title="Loser"><%= game.loser %></div>
<div class="cell" data-title="Low Roll"><%= game.low_roll %></div>
<div class="cell" data-title="Payout"><%= game.payout %></div>
</div>
<% end %>
</div>
<a href="/">Leaderboard</a>
</div>
<% else %>
<p>No recent games</p>
<% end %>

View File

@ -0,0 +1,22 @@
<h1>Game <%= @game.id %></h1>
<table class="tg"><tbody>
<tr>
<th class="tg-0lax">Game Type</th>
<th class="tg-0lax"><%= @game.gametype_str %></th>
</tr>
<tr>
<th class="tg-0lax">Winner</th>
<th class="tg-0lax"><%= @game.winner %></th>
</tr>
<tr>
<td class="tg-0lax">Loser</td>
<td class="tg-0lax"><%= @game.loser %></td>
</tr>
<tr>
<td class="tg-0lax">Payout</td>
<td class="tg-0lax"><%= @game.payout %></td>
</tr>
</tbody></table>
<%= link_to "Back", game_index_path %>