diff --git a/analysis/src/head_to_head.rs b/analysis/src/head_to_head.rs
new file mode 100644
index 0000000..e2b705a
--- /dev/null
+++ b/analysis/src/head_to_head.rs
@@ -0,0 +1,52 @@
+use std::collections::HashMap;
+
+#[derive(Debug, PartialEq)]
+pub struct Output {
+ pub players: HashMap,
+ pub head_to_head: HashMap>,
+}
+
+pub fn parse(buf: &[u8]) -> Result
}>
+
+ { matrix_view }
+
+
+ }
+}
+
+#[leptos::component]
+fn matrix(data: common::demo_analysis::HeadToHead) -> impl leptos::IntoView {
+ let row_player_view = move || {
+ data.row_players.iter().enumerate().map(|(idx, name)| {
+ view! {
+ {name}
+ }
+ }).collect::>()
+ };
+
+ let column_player_view = move || {
+ data.column_players.iter().enumerate().map(|(idx, name)| {
+ view! {
+ {name}
+ }
+ }).collect::>()
+ };
+
+ let style = stylers::style! {
+ "Head-to-Head-Matrix-Cell",
+ .cell {
+ display: grid;
+
+ }
+ .cell_back {
+ grid-row: 1/3;
+ grid-column: 1/3;
+
+ background-color: var(--color-surface-a0);
+ background-image: linear-gradient(to right top, var(--color-surface-a0) 50%, var(--color-surface-a10) 50%);
+ }
+ };
+
+ let entry_view = move || {
+ data.entries.iter().enumerate().flat_map(|(row, row_data)| {
+ row_data.iter().enumerate().map(move |(column, &(row_kills, column_kills))| {
+ let entry = move || view! {
+ { row_kills }
+ { column_kills }
+ };
+
+ view! {
+ class = style,
+
+ }
+ })
+ }).collect::>()
+ };
+
+ view! {
+ { row_player_view }
+ { column_player_view }
+ { entry_view }
+ }
+}
diff --git a/frontend/src/demo/scoreboard/utility.rs b/frontend/src/demo/scoreboard/utility.rs
deleted file mode 100644
index e673cd4..0000000
--- a/frontend/src/demo/scoreboard/utility.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-use leptos::*;
-
-#[leptos::component]
-pub fn utility() -> impl leptos::IntoView {
- view! {
- Utility
- }
-}
diff --git a/frontend/src/main.rs b/frontend/src/main.rs
index 765565c..0780983 100644
--- a/frontend/src/main.rs
+++ b/frontend/src/main.rs
@@ -22,7 +22,7 @@ fn main() {
-
+
diff --git a/migrations/2024-11-04-220702_head-to-head/down.sql b/migrations/2024-11-04-220702_head-to-head/down.sql
new file mode 100644
index 0000000..a368113
--- /dev/null
+++ b/migrations/2024-11-04-220702_head-to-head/down.sql
@@ -0,0 +1,2 @@
+-- This file should undo anything in `up.sql`
+DROP TABLE demo_head_to_head;
diff --git a/migrations/2024-11-04-220702_head-to-head/up.sql b/migrations/2024-11-04-220702_head-to-head/up.sql
new file mode 100644
index 0000000..8692b5a
--- /dev/null
+++ b/migrations/2024-11-04-220702_head-to-head/up.sql
@@ -0,0 +1,8 @@
+-- Your SQL goes here
+CREATE TABLE IF NOT EXISTS demo_head_to_head (
+ demo_id TEXT NOT NULL,
+ player TEXT NOT NULL,
+ enemy TEXT NOT NULL,
+ kills int2 NOT NULL,
+ PRIMARY KEY (demo_id, player, enemy)
+);