From 40b429ad2f2953a28939a6acecc2b7de477f02c8 Mon Sep 17 00:00:00 2001
From: ItsArnavSh
Date: Thu, 19 Sep 2024 20:18:24 +0530
Subject: [PATCH] Designed
---
backend/Entries/1.txt | 5 +-
backend/Entries/10.txt | 5 +-
backend/Entries/100.txt | 5 +-
backend/Entries/11.txt | 5 +-
backend/Entries/12.txt | 5 +-
backend/Entries/13.txt | 5 +-
backend/Entries/14.txt | 5 +-
backend/Entries/15.txt | 5 +-
backend/Entries/16.txt | 5 +-
backend/Entries/17.txt | 5 +-
backend/Entries/18.txt | 5 +-
backend/Entries/19.txt | 5 +-
backend/Entries/2.txt | 5 +-
backend/Entries/20.txt | 5 +-
backend/Entries/21.txt | 5 +-
backend/Entries/22.txt | 5 +-
backend/Entries/23.txt | 5 +-
backend/Entries/24.txt | 5 +-
backend/Entries/25.txt | 5 +-
backend/Entries/26.txt | 5 +-
backend/Entries/27.txt | 5 +-
backend/Entries/28.txt | 5 +-
backend/Entries/29.txt | 5 +-
backend/Entries/3.txt | 5 +-
backend/Entries/30.txt | 5 +-
backend/Entries/31.txt | 5 +-
backend/Entries/32.txt | 5 +-
backend/Entries/33.txt | 5 +-
backend/Entries/34.txt | 5 +-
backend/Entries/35.txt | 5 +-
backend/Entries/36.txt | 5 +-
backend/Entries/37.txt | 5 +-
backend/Entries/38.txt | 5 +-
backend/Entries/39.txt | 5 +-
backend/Entries/4.txt | 5 +-
backend/Entries/40.txt | 5 +-
backend/Entries/41.txt | 5 +-
backend/Entries/42.txt | 5 +-
backend/Entries/43.txt | 5 +-
backend/Entries/44.txt | 5 +-
backend/Entries/45.txt | 5 +-
backend/Entries/46.txt | 5 +-
backend/Entries/47.txt | 5 +-
backend/Entries/48.txt | 5 +-
backend/Entries/49.txt | 5 +-
backend/Entries/5.txt | 5 +-
backend/Entries/50.txt | 5 +-
backend/Entries/51.txt | 5 +-
backend/Entries/52.txt | 5 +-
backend/Entries/53.txt | 5 +-
backend/Entries/54.txt | 5 +-
backend/Entries/55.txt | 5 +-
backend/Entries/56.txt | 5 +-
backend/Entries/57.txt | 5 +-
backend/Entries/58.txt | 5 +-
backend/Entries/59.txt | 5 +-
backend/Entries/6.txt | 5 +-
backend/Entries/60.txt | 5 +-
backend/Entries/61.txt | 5 +-
backend/Entries/62.txt | 5 +-
backend/Entries/63.txt | 5 +-
backend/Entries/64.txt | 5 +-
backend/Entries/65.txt | 5 +-
backend/Entries/66.txt | 5 +-
backend/Entries/67.txt | 5 +-
backend/Entries/68.txt | 5 +-
backend/Entries/69.txt | 5 +-
backend/Entries/7.txt | 5 +-
backend/Entries/70.txt | 5 +-
backend/Entries/71.txt | 5 +-
backend/Entries/72.txt | 5 +-
backend/Entries/73.txt | 5 +-
backend/Entries/74.txt | 5 +-
backend/Entries/75.txt | 5 +-
backend/Entries/76.txt | 5 +-
backend/Entries/77.txt | 5 +-
backend/Entries/78.txt | 5 +-
backend/Entries/79.txt | 5 +-
backend/Entries/8.txt | 5 +-
backend/Entries/80.txt | 5 +-
backend/Entries/81.txt | 5 +-
backend/Entries/82.txt | 5 +-
backend/Entries/83.txt | 5 +-
backend/Entries/84.txt | 5 +-
backend/Entries/85.txt | 5 +-
backend/Entries/86.txt | 5 +-
backend/Entries/87.txt | 5 +-
backend/Entries/88.txt | 5 +-
backend/Entries/89.txt | 5 +-
backend/Entries/9.txt | 5 +-
backend/Entries/90.txt | 5 +-
backend/Entries/91.txt | 5 +-
backend/Entries/92.txt | 5 +-
backend/Entries/93.txt | 5 +-
backend/Entries/94.txt | 5 +-
backend/Entries/95.txt | 5 +-
backend/Entries/96.txt | 5 +-
backend/Entries/97.txt | 5 +-
backend/Entries/98.txt | 5 +-
backend/Entries/99.txt | 5 +-
backend/Entries/generate.py | 29 +++-
backend/dist/index.js | 74 ++++----
frontend/src/App.css | 16 +-
frontend/src/components/hallofame/Canvas.tsx | 158 ++++++++++++------
.../components/hallofame/fetchPokemonData.ts | 58 ++++---
frontend/src/components/tutorial/Tutorial.tsx | 2 +-
106 files changed, 616 insertions(+), 221 deletions(-)
diff --git a/backend/Entries/1.txt b/backend/Entries/1.txt
index bcd8caf..be60d4a 100644
--- a/backend/Entries/1.txt
+++ b/backend/Entries/1.txt
@@ -1 +1,4 @@
-320, Sampl
\ No newline at end of file
+Charlie;
+ENRL3088;
+462;
+Dream big!;
diff --git a/backend/Entries/10.txt b/backend/Entries/10.txt
index f5c44a6..0f6d2fc 100644
--- a/backend/Entries/10.txt
+++ b/backend/Entries/10.txt
@@ -1 +1,4 @@
-460, Sampl
\ No newline at end of file
+Hannah;
+ENRL9296;
+250;
+Hello world!;
diff --git a/backend/Entries/100.txt b/backend/Entries/100.txt
index 77a9819..6ea5364 100644
--- a/backend/Entries/100.txt
+++ b/backend/Entries/100.txt
@@ -1 +1,4 @@
-123, Sampl
\ No newline at end of file
+Diana;
+ENRL8793;
+250;
+Keep coding!;
diff --git a/backend/Entries/11.txt b/backend/Entries/11.txt
index 1431174..8731c3a 100644
--- a/backend/Entries/11.txt
+++ b/backend/Entries/11.txt
@@ -1 +1,4 @@
-75, Sampl
\ No newline at end of file
+Bob;
+ENRL6501;
+532;
+Dream big!;
diff --git a/backend/Entries/12.txt b/backend/Entries/12.txt
index d209144..00063e0 100644
--- a/backend/Entries/12.txt
+++ b/backend/Entries/12.txt
@@ -1 +1,4 @@
-311, Sampl
\ No newline at end of file
+Hannah;
+ENRL3891;
+584;
+Python is awesome!;
diff --git a/backend/Entries/13.txt b/backend/Entries/13.txt
index 986c964..a690c23 100644
--- a/backend/Entries/13.txt
+++ b/backend/Entries/13.txt
@@ -1 +1,4 @@
-69, Sampl
\ No newline at end of file
+Bob;
+ENRL2050;
+512;
+Hello world!;
diff --git a/backend/Entries/14.txt b/backend/Entries/14.txt
index 4d2cf84..1be35d1 100644
--- a/backend/Entries/14.txt
+++ b/backend/Entries/14.txt
@@ -1 +1,4 @@
-429, Sampl
\ No newline at end of file
+Edward;
+ENRL5285;
+188;
+Keep coding!;
diff --git a/backend/Entries/15.txt b/backend/Entries/15.txt
index 2ea27a4..bb5479b 100644
--- a/backend/Entries/15.txt
+++ b/backend/Entries/15.txt
@@ -1 +1,4 @@
-592, Sampl
\ No newline at end of file
+Charlie;
+ENRL1667;
+289;
+Keep coding!;
diff --git a/backend/Entries/16.txt b/backend/Entries/16.txt
index 68f4e9c..32293af 100644
--- a/backend/Entries/16.txt
+++ b/backend/Entries/16.txt
@@ -1 +1,4 @@
-456, Sampl
\ No newline at end of file
+Hannah;
+ENRL8065;
+284;
+Dream big!;
diff --git a/backend/Entries/17.txt b/backend/Entries/17.txt
index 29fe42b..34569dd 100644
--- a/backend/Entries/17.txt
+++ b/backend/Entries/17.txt
@@ -1 +1,4 @@
-288, Sampl
\ No newline at end of file
+Alice;
+ENRL1863;
+553;
+Hello world!;
diff --git a/backend/Entries/18.txt b/backend/Entries/18.txt
index 5184d35..09a9eab 100644
--- a/backend/Entries/18.txt
+++ b/backend/Entries/18.txt
@@ -1 +1,4 @@
-402, Sampl
\ No newline at end of file
+Alice;
+ENRL9019;
+176;
+Hello world!;
diff --git a/backend/Entries/19.txt b/backend/Entries/19.txt
index c3274e1..f550271 100644
--- a/backend/Entries/19.txt
+++ b/backend/Entries/19.txt
@@ -1 +1,4 @@
-81, Sampl
\ No newline at end of file
+Charlie;
+ENRL5064;
+259;
+Learning is fun.;
diff --git a/backend/Entries/2.txt b/backend/Entries/2.txt
index 5399434..acf46c6 100644
--- a/backend/Entries/2.txt
+++ b/backend/Entries/2.txt
@@ -1 +1,4 @@
-47, Sampl
\ No newline at end of file
+Fiona;
+ENRL9941;
+376;
+Dream big!;
diff --git a/backend/Entries/20.txt b/backend/Entries/20.txt
index 315933b..b30bf34 100644
--- a/backend/Entries/20.txt
+++ b/backend/Entries/20.txt
@@ -1 +1,4 @@
-84, Sampl
\ No newline at end of file
+Charlie;
+ENRL6379;
+517;
+Learning is fun.;
diff --git a/backend/Entries/21.txt b/backend/Entries/21.txt
index a811f19..c34c616 100644
--- a/backend/Entries/21.txt
+++ b/backend/Entries/21.txt
@@ -1 +1,4 @@
-50, Sampl
\ No newline at end of file
+Bob;
+ENRL4955;
+10;
+This is a test.;
diff --git a/backend/Entries/22.txt b/backend/Entries/22.txt
index b323965..121ff54 100644
--- a/backend/Entries/22.txt
+++ b/backend/Entries/22.txt
@@ -1 +1,4 @@
-560, Sampl
\ No newline at end of file
+Fiona;
+ENRL7729;
+197;
+Keep coding!;
diff --git a/backend/Entries/23.txt b/backend/Entries/23.txt
index 4489211..6817255 100644
--- a/backend/Entries/23.txt
+++ b/backend/Entries/23.txt
@@ -1 +1,4 @@
-170, Sampl
\ No newline at end of file
+Hannah;
+ENRL5952;
+153;
+Hello world!;
diff --git a/backend/Entries/24.txt b/backend/Entries/24.txt
index 0011e8e..18488d9 100644
--- a/backend/Entries/24.txt
+++ b/backend/Entries/24.txt
@@ -1 +1,4 @@
-128, Sampl
\ No newline at end of file
+Hannah;
+ENRL4090;
+330;
+Adventure awaits.;
diff --git a/backend/Entries/25.txt b/backend/Entries/25.txt
index 9ea7db0..23ff556 100644
--- a/backend/Entries/25.txt
+++ b/backend/Entries/25.txt
@@ -1 +1,4 @@
-133, Sampl
\ No newline at end of file
+Fiona;
+ENRL5103;
+346;
+Learning is fun.;
diff --git a/backend/Entries/26.txt b/backend/Entries/26.txt
index c5092de..b9c5d31 100644
--- a/backend/Entries/26.txt
+++ b/backend/Entries/26.txt
@@ -1 +1,4 @@
-98, Sampl
\ No newline at end of file
+Fiona;
+ENRL3797;
+253;
+Just a random one-liner.;
diff --git a/backend/Entries/27.txt b/backend/Entries/27.txt
index a422d54..2c03979 100644
--- a/backend/Entries/27.txt
+++ b/backend/Entries/27.txt
@@ -1 +1,4 @@
-425, Sampl
\ No newline at end of file
+Alice;
+ENRL3723;
+389;
+Adventure awaits.;
diff --git a/backend/Entries/28.txt b/backend/Entries/28.txt
index 493533d..d722330 100644
--- a/backend/Entries/28.txt
+++ b/backend/Entries/28.txt
@@ -1 +1,4 @@
-323, Sampl
\ No newline at end of file
+Diana;
+ENRL8708;
+119;
+This is a test.;
diff --git a/backend/Entries/29.txt b/backend/Entries/29.txt
index 28a4b97..819c211 100644
--- a/backend/Entries/29.txt
+++ b/backend/Entries/29.txt
@@ -1 +1,4 @@
-387, Sampl
\ No newline at end of file
+Edward;
+ENRL6342;
+2;
+Keep coding!;
diff --git a/backend/Entries/3.txt b/backend/Entries/3.txt
index ab16f56..83c9da1 100644
--- a/backend/Entries/3.txt
+++ b/backend/Entries/3.txt
@@ -1 +1,4 @@
-360, Sampl
\ No newline at end of file
+Fiona;
+ENRL6014;
+448;
+This is a test.;
diff --git a/backend/Entries/30.txt b/backend/Entries/30.txt
index db7ecc0..26c6af2 100644
--- a/backend/Entries/30.txt
+++ b/backend/Entries/30.txt
@@ -1 +1,4 @@
-298, Sampl
\ No newline at end of file
+Edward;
+ENRL5631;
+206;
+Just a random one-liner.;
diff --git a/backend/Entries/31.txt b/backend/Entries/31.txt
index 4e720b7..d57b067 100644
--- a/backend/Entries/31.txt
+++ b/backend/Entries/31.txt
@@ -1 +1,4 @@
-169, Sampl
\ No newline at end of file
+Charlie;
+ENRL7804;
+223;
+Learning is fun.;
diff --git a/backend/Entries/32.txt b/backend/Entries/32.txt
index 909f724..34f05db 100644
--- a/backend/Entries/32.txt
+++ b/backend/Entries/32.txt
@@ -1 +1,4 @@
-126, Sampl
\ No newline at end of file
+Bob;
+ENRL5192;
+334;
+This is a test.;
diff --git a/backend/Entries/33.txt b/backend/Entries/33.txt
index 5781ba0..6a87699 100644
--- a/backend/Entries/33.txt
+++ b/backend/Entries/33.txt
@@ -1 +1,4 @@
-491, Sampl
\ No newline at end of file
+Bob;
+ENRL5616;
+49;
+Dream big!;
diff --git a/backend/Entries/34.txt b/backend/Entries/34.txt
index bbfbf12..232250e 100644
--- a/backend/Entries/34.txt
+++ b/backend/Entries/34.txt
@@ -1 +1,4 @@
-272, Sampl
\ No newline at end of file
+Charlie;
+ENRL4591;
+184;
+Keep coding!;
diff --git a/backend/Entries/35.txt b/backend/Entries/35.txt
index 1920818..f8d4196 100644
--- a/backend/Entries/35.txt
+++ b/backend/Entries/35.txt
@@ -1 +1,4 @@
-424, Sampl
\ No newline at end of file
+Hannah;
+ENRL6153;
+266;
+Learning is fun.;
diff --git a/backend/Entries/36.txt b/backend/Entries/36.txt
index 1a9fda6..804bdbb 100644
--- a/backend/Entries/36.txt
+++ b/backend/Entries/36.txt
@@ -1 +1,4 @@
-300, Sampl
\ No newline at end of file
+Hannah;
+ENRL7342;
+523;
+Learning is fun.;
diff --git a/backend/Entries/37.txt b/backend/Entries/37.txt
index 6889ccb..4a7c5c6 100644
--- a/backend/Entries/37.txt
+++ b/backend/Entries/37.txt
@@ -1 +1,4 @@
-283, Sampl
\ No newline at end of file
+Alice;
+ENRL9558;
+110;
+Adventure awaits.;
diff --git a/backend/Entries/38.txt b/backend/Entries/38.txt
index 8cee083..8e1ce9b 100644
--- a/backend/Entries/38.txt
+++ b/backend/Entries/38.txt
@@ -1 +1,4 @@
-586, Sampl
\ No newline at end of file
+Edward;
+ENRL8788;
+439;
+Just a random one-liner.;
diff --git a/backend/Entries/39.txt b/backend/Entries/39.txt
index 2bdd795..943add6 100644
--- a/backend/Entries/39.txt
+++ b/backend/Entries/39.txt
@@ -1 +1,4 @@
-369, Sampl
\ No newline at end of file
+George;
+ENRL6503;
+381;
+Just a random one-liner.;
diff --git a/backend/Entries/4.txt b/backend/Entries/4.txt
index 67a1c66..53f3c34 100644
--- a/backend/Entries/4.txt
+++ b/backend/Entries/4.txt
@@ -1 +1,4 @@
-356, Sampl
\ No newline at end of file
+George;
+ENRL5596;
+510;
+Dream big!;
diff --git a/backend/Entries/40.txt b/backend/Entries/40.txt
index ef2c8c1..5749a54 100644
--- a/backend/Entries/40.txt
+++ b/backend/Entries/40.txt
@@ -1 +1,4 @@
-483, Sampl
\ No newline at end of file
+Edward;
+ENRL1975;
+36;
+Keep coding!;
diff --git a/backend/Entries/41.txt b/backend/Entries/41.txt
index bf67a48..d8e944d 100644
--- a/backend/Entries/41.txt
+++ b/backend/Entries/41.txt
@@ -1 +1,4 @@
-487, Sampl
\ No newline at end of file
+Alice;
+ENRL3152;
+560;
+Just a random one-liner.;
diff --git a/backend/Entries/42.txt b/backend/Entries/42.txt
index 358d243..b4d7593 100644
--- a/backend/Entries/42.txt
+++ b/backend/Entries/42.txt
@@ -1 +1,4 @@
-78, Sampl
\ No newline at end of file
+George;
+ENRL7838;
+411;
+Learning is fun.;
diff --git a/backend/Entries/43.txt b/backend/Entries/43.txt
index 4a8c2a6..40a8585 100644
--- a/backend/Entries/43.txt
+++ b/backend/Entries/43.txt
@@ -1 +1,4 @@
-455, Sampl
\ No newline at end of file
+George;
+ENRL6153;
+93;
+Python is awesome!;
diff --git a/backend/Entries/44.txt b/backend/Entries/44.txt
index 25eba21..16b101d 100644
--- a/backend/Entries/44.txt
+++ b/backend/Entries/44.txt
@@ -1 +1,4 @@
-421, Sampl
\ No newline at end of file
+Diana;
+ENRL3212;
+468;
+Adventure awaits.;
diff --git a/backend/Entries/45.txt b/backend/Entries/45.txt
index 6819237..14c9c76 100644
--- a/backend/Entries/45.txt
+++ b/backend/Entries/45.txt
@@ -1 +1,4 @@
-492, Sampl
\ No newline at end of file
+Charlie;
+ENRL4232;
+582;
+Python is awesome!;
diff --git a/backend/Entries/46.txt b/backend/Entries/46.txt
index b64be95..67a3923 100644
--- a/backend/Entries/46.txt
+++ b/backend/Entries/46.txt
@@ -1 +1,4 @@
-247, Sampl
\ No newline at end of file
+Edward;
+ENRL6823;
+348;
+Learning is fun.;
diff --git a/backend/Entries/47.txt b/backend/Entries/47.txt
index 8911a00..0be6c4b 100644
--- a/backend/Entries/47.txt
+++ b/backend/Entries/47.txt
@@ -1 +1,4 @@
-212, Sampl
\ No newline at end of file
+Bob;
+ENRL5329;
+514;
+Keep coding!;
diff --git a/backend/Entries/48.txt b/backend/Entries/48.txt
index 4392740..1144a24 100644
--- a/backend/Entries/48.txt
+++ b/backend/Entries/48.txt
@@ -1 +1,4 @@
-225, Sampl
\ No newline at end of file
+George;
+ENRL8483;
+356;
+Python is awesome!;
diff --git a/backend/Entries/49.txt b/backend/Entries/49.txt
index e32450a..baadbfe 100644
--- a/backend/Entries/49.txt
+++ b/backend/Entries/49.txt
@@ -1 +1,4 @@
-587, Sampl
\ No newline at end of file
+Alice;
+ENRL5456;
+86;
+Adventure awaits.;
diff --git a/backend/Entries/5.txt b/backend/Entries/5.txt
index ce42de4..1a85186 100644
--- a/backend/Entries/5.txt
+++ b/backend/Entries/5.txt
@@ -1 +1,4 @@
-442, Sampl
\ No newline at end of file
+Fiona;
+ENRL3181;
+198;
+Python is awesome!;
diff --git a/backend/Entries/50.txt b/backend/Entries/50.txt
index 2d0fdd3..0ca7d2f 100644
--- a/backend/Entries/50.txt
+++ b/backend/Entries/50.txt
@@ -1 +1,4 @@
-61, Sampl
\ No newline at end of file
+George;
+ENRL2125;
+325;
+Hello world!;
diff --git a/backend/Entries/51.txt b/backend/Entries/51.txt
index be55c61..64188c7 100644
--- a/backend/Entries/51.txt
+++ b/backend/Entries/51.txt
@@ -1 +1,4 @@
-11, Sampl
\ No newline at end of file
+Diana;
+ENRL8019;
+207;
+Just a random one-liner.;
diff --git a/backend/Entries/52.txt b/backend/Entries/52.txt
index ee27a11..061c92d 100644
--- a/backend/Entries/52.txt
+++ b/backend/Entries/52.txt
@@ -1 +1,4 @@
-459, Sampl
\ No newline at end of file
+Edward;
+ENRL1403;
+88;
+Adventure awaits.;
diff --git a/backend/Entries/53.txt b/backend/Entries/53.txt
index 6cd579e..aaf6955 100644
--- a/backend/Entries/53.txt
+++ b/backend/Entries/53.txt
@@ -1 +1,4 @@
-426, Sampl
\ No newline at end of file
+Fiona;
+ENRL9142;
+31;
+Dream big!;
diff --git a/backend/Entries/54.txt b/backend/Entries/54.txt
index 6ee8c87..cb42387 100644
--- a/backend/Entries/54.txt
+++ b/backend/Entries/54.txt
@@ -1 +1,4 @@
-315, Sampl
\ No newline at end of file
+Alice;
+ENRL9611;
+259;
+Learning is fun.;
diff --git a/backend/Entries/55.txt b/backend/Entries/55.txt
index 2d4b320..75fa27e 100644
--- a/backend/Entries/55.txt
+++ b/backend/Entries/55.txt
@@ -1 +1,4 @@
-287, Sampl
\ No newline at end of file
+Fiona;
+ENRL6614;
+280;
+Hello world!;
diff --git a/backend/Entries/56.txt b/backend/Entries/56.txt
index f2bc97c..f5fca71 100644
--- a/backend/Entries/56.txt
+++ b/backend/Entries/56.txt
@@ -1 +1,4 @@
-253, Sampl
\ No newline at end of file
+Hannah;
+ENRL1585;
+200;
+Hello world!;
diff --git a/backend/Entries/57.txt b/backend/Entries/57.txt
index e9464c1..afef6c5 100644
--- a/backend/Entries/57.txt
+++ b/backend/Entries/57.txt
@@ -1 +1,4 @@
-415, Sampl
\ No newline at end of file
+Alice;
+ENRL2780;
+347;
+Python is awesome!;
diff --git a/backend/Entries/58.txt b/backend/Entries/58.txt
index 18c5272..bc4ddc2 100644
--- a/backend/Entries/58.txt
+++ b/backend/Entries/58.txt
@@ -1 +1,4 @@
-598, Sampl
\ No newline at end of file
+Edward;
+ENRL1574;
+247;
+Adventure awaits.;
diff --git a/backend/Entries/59.txt b/backend/Entries/59.txt
index 583e144..5404702 100644
--- a/backend/Entries/59.txt
+++ b/backend/Entries/59.txt
@@ -1 +1,4 @@
-542, Sampl
\ No newline at end of file
+Charlie;
+ENRL1175;
+498;
+Keep coding!;
diff --git a/backend/Entries/6.txt b/backend/Entries/6.txt
index 0702d34..57c9a54 100644
--- a/backend/Entries/6.txt
+++ b/backend/Entries/6.txt
@@ -1 +1,4 @@
-428, Sampl
\ No newline at end of file
+Edward;
+ENRL2447;
+333;
+This is a test.;
diff --git a/backend/Entries/60.txt b/backend/Entries/60.txt
index 0c34e4f..8597cd9 100644
--- a/backend/Entries/60.txt
+++ b/backend/Entries/60.txt
@@ -1 +1,4 @@
-270, Sampl
\ No newline at end of file
+Alice;
+ENRL4823;
+106;
+Dream big!;
diff --git a/backend/Entries/61.txt b/backend/Entries/61.txt
index ad92f21..78d0945 100644
--- a/backend/Entries/61.txt
+++ b/backend/Entries/61.txt
@@ -1 +1,4 @@
-95, Sampl
\ No newline at end of file
+Alice;
+ENRL9316;
+189;
+Learning is fun.;
diff --git a/backend/Entries/62.txt b/backend/Entries/62.txt
index 2974a92..47ab1ca 100644
--- a/backend/Entries/62.txt
+++ b/backend/Entries/62.txt
@@ -1 +1,4 @@
-550, Sampl
\ No newline at end of file
+Fiona;
+ENRL4123;
+397;
+Python is awesome!;
diff --git a/backend/Entries/63.txt b/backend/Entries/63.txt
index bfcf1d1..13841c9 100644
--- a/backend/Entries/63.txt
+++ b/backend/Entries/63.txt
@@ -1 +1,4 @@
-203, Sampl
\ No newline at end of file
+Alice;
+ENRL5209;
+316;
+Dream big!;
diff --git a/backend/Entries/64.txt b/backend/Entries/64.txt
index 33ee313..30a6b60 100644
--- a/backend/Entries/64.txt
+++ b/backend/Entries/64.txt
@@ -1 +1,4 @@
-9, Sampl
\ No newline at end of file
+Edward;
+ENRL6823;
+409;
+Python is awesome!;
diff --git a/backend/Entries/65.txt b/backend/Entries/65.txt
index f429c57..9489749 100644
--- a/backend/Entries/65.txt
+++ b/backend/Entries/65.txt
@@ -1 +1,4 @@
-269, Sampl
\ No newline at end of file
+Bob;
+ENRL1439;
+476;
+This is a test.;
diff --git a/backend/Entries/66.txt b/backend/Entries/66.txt
index 4d2cf84..bf9cfdc 100644
--- a/backend/Entries/66.txt
+++ b/backend/Entries/66.txt
@@ -1 +1,4 @@
-429, Sampl
\ No newline at end of file
+Alice;
+ENRL2838;
+297;
+Adventure awaits.;
diff --git a/backend/Entries/67.txt b/backend/Entries/67.txt
index 188b677..da76dbc 100644
--- a/backend/Entries/67.txt
+++ b/backend/Entries/67.txt
@@ -1 +1,4 @@
-51, Sampl
\ No newline at end of file
+Edward;
+ENRL6682;
+243;
+Just a random one-liner.;
diff --git a/backend/Entries/68.txt b/backend/Entries/68.txt
index f1b1d30..21fe055 100644
--- a/backend/Entries/68.txt
+++ b/backend/Entries/68.txt
@@ -1 +1,4 @@
-293, Sampl
\ No newline at end of file
+Alice;
+ENRL3785;
+8;
+Adventure awaits.;
diff --git a/backend/Entries/69.txt b/backend/Entries/69.txt
index 12d5de1..c900f24 100644
--- a/backend/Entries/69.txt
+++ b/backend/Entries/69.txt
@@ -1 +1,4 @@
-441, Sampl
\ No newline at end of file
+Hannah;
+ENRL2311;
+190;
+Hello world!;
diff --git a/backend/Entries/7.txt b/backend/Entries/7.txt
index ce3f70c..83ac1a8 100644
--- a/backend/Entries/7.txt
+++ b/backend/Entries/7.txt
@@ -1 +1,4 @@
-134, Sampl
\ No newline at end of file
+Charlie;
+ENRL3825;
+491;
+Python is awesome!;
diff --git a/backend/Entries/70.txt b/backend/Entries/70.txt
index 8c0d935..98317e3 100644
--- a/backend/Entries/70.txt
+++ b/backend/Entries/70.txt
@@ -1 +1,4 @@
-496, Sampl
\ No newline at end of file
+Edward;
+ENRL5517;
+368;
+Just a random one-liner.;
diff --git a/backend/Entries/71.txt b/backend/Entries/71.txt
index f29ddee..186cb8b 100644
--- a/backend/Entries/71.txt
+++ b/backend/Entries/71.txt
@@ -1 +1,4 @@
-519, Sampl
\ No newline at end of file
+Alice;
+ENRL9583;
+73;
+Adventure awaits.;
diff --git a/backend/Entries/72.txt b/backend/Entries/72.txt
index 9c92102..495f6d9 100644
--- a/backend/Entries/72.txt
+++ b/backend/Entries/72.txt
@@ -1 +1,4 @@
-553, Sampl
\ No newline at end of file
+Alice;
+ENRL2636;
+205;
+This is a test.;
diff --git a/backend/Entries/73.txt b/backend/Entries/73.txt
index f57ab0a..1aed151 100644
--- a/backend/Entries/73.txt
+++ b/backend/Entries/73.txt
@@ -1 +1,4 @@
-125, Sampl
\ No newline at end of file
+Bob;
+ENRL9540;
+106;
+Adventure awaits.;
diff --git a/backend/Entries/74.txt b/backend/Entries/74.txt
index 3eca761..35acbf8 100644
--- a/backend/Entries/74.txt
+++ b/backend/Entries/74.txt
@@ -1 +1,4 @@
-176, Sampl
\ No newline at end of file
+Edward;
+ENRL9701;
+137;
+Learning is fun.;
diff --git a/backend/Entries/75.txt b/backend/Entries/75.txt
index b64be95..f26511f 100644
--- a/backend/Entries/75.txt
+++ b/backend/Entries/75.txt
@@ -1 +1,4 @@
-247, Sampl
\ No newline at end of file
+Edward;
+ENRL9695;
+344;
+Just a random one-liner.;
diff --git a/backend/Entries/76.txt b/backend/Entries/76.txt
index e6c4f2c..bee5b48 100644
--- a/backend/Entries/76.txt
+++ b/backend/Entries/76.txt
@@ -1 +1,4 @@
-265, Sampl
\ No newline at end of file
+Diana;
+ENRL5389;
+194;
+This is a test.;
diff --git a/backend/Entries/77.txt b/backend/Entries/77.txt
index b915c2e..e0898cd 100644
--- a/backend/Entries/77.txt
+++ b/backend/Entries/77.txt
@@ -1 +1,4 @@
-314, Sampl
\ No newline at end of file
+Diana;
+ENRL5899;
+468;
+Hello world!;
diff --git a/backend/Entries/78.txt b/backend/Entries/78.txt
index d2a25e7..928d9ef 100644
--- a/backend/Entries/78.txt
+++ b/backend/Entries/78.txt
@@ -1 +1,4 @@
-109, Sampl
\ No newline at end of file
+Charlie;
+ENRL4443;
+460;
+Learning is fun.;
diff --git a/backend/Entries/79.txt b/backend/Entries/79.txt
index 4622325..fc93939 100644
--- a/backend/Entries/79.txt
+++ b/backend/Entries/79.txt
@@ -1 +1,4 @@
-241, Sampl
\ No newline at end of file
+Hannah;
+ENRL5172;
+581;
+Python is awesome!;
diff --git a/backend/Entries/8.txt b/backend/Entries/8.txt
index f3fd616..a7b3c83 100644
--- a/backend/Entries/8.txt
+++ b/backend/Entries/8.txt
@@ -1 +1,4 @@
-246, Sampl
\ No newline at end of file
+Fiona;
+ENRL1711;
+212;
+Dream big!;
diff --git a/backend/Entries/80.txt b/backend/Entries/80.txt
index b915c2e..78ecfc7 100644
--- a/backend/Entries/80.txt
+++ b/backend/Entries/80.txt
@@ -1 +1,4 @@
-314, Sampl
\ No newline at end of file
+Bob;
+ENRL4978;
+62;
+Keep coding!;
diff --git a/backend/Entries/81.txt b/backend/Entries/81.txt
index e6d09c7..ea2b625 100644
--- a/backend/Entries/81.txt
+++ b/backend/Entries/81.txt
@@ -1 +1,4 @@
-21, Sampl
\ No newline at end of file
+George;
+ENRL7222;
+394;
+Hello world!;
diff --git a/backend/Entries/82.txt b/backend/Entries/82.txt
index db7ecc0..2782711 100644
--- a/backend/Entries/82.txt
+++ b/backend/Entries/82.txt
@@ -1 +1,4 @@
-298, Sampl
\ No newline at end of file
+Diana;
+ENRL8276;
+177;
+Learning is fun.;
diff --git a/backend/Entries/83.txt b/backend/Entries/83.txt
index 7fdacd6..a509e2f 100644
--- a/backend/Entries/83.txt
+++ b/backend/Entries/83.txt
@@ -1 +1,4 @@
-101, Sampl
\ No newline at end of file
+Hannah;
+ENRL3913;
+232;
+This is a test.;
diff --git a/backend/Entries/84.txt b/backend/Entries/84.txt
index c38f2b8..e595d28 100644
--- a/backend/Entries/84.txt
+++ b/backend/Entries/84.txt
@@ -1 +1,4 @@
-357, Sampl
\ No newline at end of file
+Bob;
+ENRL8146;
+311;
+Hello world!;
diff --git a/backend/Entries/85.txt b/backend/Entries/85.txt
index e32450a..1681d9d 100644
--- a/backend/Entries/85.txt
+++ b/backend/Entries/85.txt
@@ -1 +1,4 @@
-587, Sampl
\ No newline at end of file
+Edward;
+ENRL2554;
+570;
+Learning is fun.;
diff --git a/backend/Entries/86.txt b/backend/Entries/86.txt
index 71f8f01..4a20c4d 100644
--- a/backend/Entries/86.txt
+++ b/backend/Entries/86.txt
@@ -1 +1,4 @@
-112, Sampl
\ No newline at end of file
+George;
+ENRL1926;
+437;
+Keep coding!;
diff --git a/backend/Entries/87.txt b/backend/Entries/87.txt
index 9c8153f..100d6c8 100644
--- a/backend/Entries/87.txt
+++ b/backend/Entries/87.txt
@@ -1 +1,4 @@
-205, Sampl
\ No newline at end of file
+Fiona;
+ENRL3371;
+191;
+Hello world!;
diff --git a/backend/Entries/88.txt b/backend/Entries/88.txt
index f7220ea..eba5a0b 100644
--- a/backend/Entries/88.txt
+++ b/backend/Entries/88.txt
@@ -1 +1,4 @@
-575, Sampl
\ No newline at end of file
+Bob;
+ENRL2322;
+1;
+Python is awesome!;
diff --git a/backend/Entries/89.txt b/backend/Entries/89.txt
index bd79e97..2acedb2 100644
--- a/backend/Entries/89.txt
+++ b/backend/Entries/89.txt
@@ -1 +1,4 @@
-93, Sampl
\ No newline at end of file
+Fiona;
+ENRL7499;
+428;
+Just a random one-liner.;
diff --git a/backend/Entries/9.txt b/backend/Entries/9.txt
index e42b0d0..1b2e5d1 100644
--- a/backend/Entries/9.txt
+++ b/backend/Entries/9.txt
@@ -1 +1,4 @@
-317, Sampl
\ No newline at end of file
+Charlie;
+ENRL4077;
+385;
+This is a test.;
diff --git a/backend/Entries/90.txt b/backend/Entries/90.txt
index e8c3cd4..10e2adb 100644
--- a/backend/Entries/90.txt
+++ b/backend/Entries/90.txt
@@ -1 +1,4 @@
-502, Sampl
\ No newline at end of file
+Bob;
+ENRL8967;
+43;
+Keep coding!;
diff --git a/backend/Entries/91.txt b/backend/Entries/91.txt
index 7767336..0b3f60c 100644
--- a/backend/Entries/91.txt
+++ b/backend/Entries/91.txt
@@ -1 +1,4 @@
-71, Sampl
\ No newline at end of file
+Fiona;
+ENRL7849;
+196;
+Dream big!;
diff --git a/backend/Entries/92.txt b/backend/Entries/92.txt
index f474f2a..aab19ca 100644
--- a/backend/Entries/92.txt
+++ b/backend/Entries/92.txt
@@ -1 +1,4 @@
-44, Sampl
\ No newline at end of file
+Bob;
+ENRL2519;
+59;
+Just a random one-liner.;
diff --git a/backend/Entries/93.txt b/backend/Entries/93.txt
index 4622325..1b2ac96 100644
--- a/backend/Entries/93.txt
+++ b/backend/Entries/93.txt
@@ -1 +1,4 @@
-241, Sampl
\ No newline at end of file
+George;
+ENRL6945;
+460;
+Just a random one-liner.;
diff --git a/backend/Entries/94.txt b/backend/Entries/94.txt
index 986c964..e61d74c 100644
--- a/backend/Entries/94.txt
+++ b/backend/Entries/94.txt
@@ -1 +1,4 @@
-69, Sampl
\ No newline at end of file
+Charlie;
+ENRL9685;
+281;
+Python is awesome!;
diff --git a/backend/Entries/95.txt b/backend/Entries/95.txt
index 6b107bf..39d5983 100644
--- a/backend/Entries/95.txt
+++ b/backend/Entries/95.txt
@@ -1 +1,4 @@
-38, Sampl
\ No newline at end of file
+Charlie;
+ENRL7519;
+367;
+Adventure awaits.;
diff --git a/backend/Entries/96.txt b/backend/Entries/96.txt
index e058dad..e21f5d1 100644
--- a/backend/Entries/96.txt
+++ b/backend/Entries/96.txt
@@ -1 +1,4 @@
-141, Sampl
\ No newline at end of file
+Edward;
+ENRL4025;
+419;
+Keep coding!;
diff --git a/backend/Entries/97.txt b/backend/Entries/97.txt
index 738bd21..6a93052 100644
--- a/backend/Entries/97.txt
+++ b/backend/Entries/97.txt
@@ -1 +1,4 @@
-10, Sampl
\ No newline at end of file
+George;
+ENRL4464;
+372;
+Hello world!;
diff --git a/backend/Entries/98.txt b/backend/Entries/98.txt
index e6d09c7..521ffb3 100644
--- a/backend/Entries/98.txt
+++ b/backend/Entries/98.txt
@@ -1 +1,4 @@
-21, Sampl
\ No newline at end of file
+Bob;
+ENRL9748;
+320;
+Keep coding!;
diff --git a/backend/Entries/99.txt b/backend/Entries/99.txt
index cc7eec8..6d6c2cc 100644
--- a/backend/Entries/99.txt
+++ b/backend/Entries/99.txt
@@ -1 +1,4 @@
-232, Sampl
\ No newline at end of file
+Diana;
+ENRL9699;
+44;
+This is a test.;
diff --git a/backend/Entries/generate.py b/backend/Entries/generate.py
index d192a27..4ca1d08 100644
--- a/backend/Entries/generate.py
+++ b/backend/Entries/generate.py
@@ -1,9 +1,33 @@
import random
def generate_files(num_files):
+ names = ["Alice", "Bob", "Charlie", "Diana", "Edward", "Fiona", "George", "Hannah"]
+ one_liners = [
+ "Hello world!",
+ "Just a random one-liner.",
+ "Python is awesome!",
+ "Learning is fun.",
+ "Keep coding!",
+ "This is a test.",
+ "Adventure awaits.",
+ "Dream big!"
+ ]
+
for i in range(1, num_files + 1):
+ # Randomly select a name from the list
+ random_name = random.choice(names)
+
+ # Generate a random enrollment number
+ random_enrl = f"ENRL{random.randint(1000, 9999)}"
+
+ # Generate a random number
random_number = random.randint(1, 600)
- content = f"{random_number}, Sampl"
+
+ # Randomly select a one-liner from the list
+ random_one_liner = random.choice(one_liners)
+
+ # Format the content with semicolons and new lines
+ content = f"{random_name};\n{random_enrl};\n{random_number};\n{random_one_liner};\n"
# Generate the filename as 1.txt, 2.txt, etc.
filename = f"{i}.txt"
@@ -11,7 +35,8 @@ def generate_files(num_files):
# Write the content to the file
with open(filename, "w") as file:
file.write(content)
- print(f"Generated {filename} with content: {content}")
+
+ print(f"Generated {filename} with content:\n{content}")
def main():
# Ask for the number of files to generate
diff --git a/backend/dist/index.js b/backend/dist/index.js
index 337ad0e..2f334da 100644
--- a/backend/dist/index.js
+++ b/backend/dist/index.js
@@ -1,7 +1,9 @@
"use strict";
-var __importDefault = (this && this.__importDefault) || function (mod) {
- return (mod && mod.__esModule) ? mod : { "default": mod };
-};
+var __importDefault =
+ (this && this.__importDefault) ||
+ function (mod) {
+ return mod && mod.__esModule ? mod : { default: mod };
+ };
Object.defineProperty(exports, "__esModule", { value: true });
const express_1 = __importDefault(require("express"));
const node_fs_1 = __importDefault(require("node:fs"));
@@ -10,35 +12,47 @@ const cors_1 = __importDefault(require("cors"));
const app = (0, express_1.default)();
const port = process.env.PORT || 3000;
app.use((0, cors_1.default)());
-app.get('/', (req, res) => {
- const directoryPath = node_path_1.default.join(__dirname, '../Entries');
- // Read all files in the Entries directory
- node_fs_1.default.readdir(directoryPath, (err, files) => {
- if (err) {
- console.error('Unable to scan directory:', err);
- res.status(500).send('Error reading directory');
- return;
+app.get("/", (req, res) => {
+ const directoryPath = node_path_1.default.join(__dirname, "../Entries");
+ // Read all files in the Entries directory
+ node_fs_1.default.readdir(directoryPath, (err, files) => {
+ if (err) {
+ console.error("Unable to scan directory:", err);
+ res.status(500).send("Error reading directory");
+ return;
+ }
+ // Array to hold the objects with number and name
+ const users = [];
+ // Iterate through all files
+ files.forEach((file) => {
+ const filePath = node_path_1.default.join(directoryPath, file);
+ // Read the content of each file
+ const data = node_fs_1.default.readFileSync(filePath, "utf8");
+
+ // Split the content by line breaks first
+ const lines = data.split("\n").map((line) => line.trim());
+
+ // Make sure there are enough lines for each field
+ if (lines.length >= 4) {
+ // Extract the data from each line
+ const name = lines[0].replace(";", "").trim(); // Remove the semicolon and trim
+ const enrl = lines[1].replace(";", "").trim(); // Remove the semicolon and trim
+ const numberStr = lines[2].replace(";", "").trim(); // Remove the semicolon and trim
+ const oneLiner = lines[3].replace(";", "").trim(); // Remove the semicolon and trim
+
+ // Parse the number from the third line
+ const number = parseInt(numberStr, 10);
+
+ // Check if the data is valid before adding it to the array
+ if (!isNaN(number) && name && enrl && oneLiner) {
+ users.push({ name, enrl, number, oneLiner });
}
- // Array to hold the objects with number and name
- const users = [];
- // Iterate through all files
- files.forEach((file) => {
- const filePath = node_path_1.default.join(directoryPath, file);
- // Read the content of each file
- const data = node_fs_1.default.readFileSync(filePath, 'utf8');
- // Split the content by the comma
- const [numberStr, name] = data.split(',').map(item => item.trim());
- // Parse the number
- const number = parseInt(numberStr, 10);
- // Check if the data is valid before adding to the array
- if (!isNaN(number) && name) {
- users.push({ number, name });
- }
- });
- console.log(users); // This will log the array of objects
- res.json({ userPokemons: users }); // Send the array as JSON to the frontend
+ }
});
+ console.log(users); // This will log the array of objects
+ res.json({ userPokemons: users }); // Send the array as JSON to the frontend
+ });
});
app.listen(port, () => {
- console.log(`Server is running on http://localhost:${port}`);
+ console.log(`Server is running on http://localhost:${port}`);
});
diff --git a/frontend/src/App.css b/frontend/src/App.css
index c4e006e..9bac961 100644
--- a/frontend/src/App.css
+++ b/frontend/src/App.css
@@ -1,15 +1,15 @@
/* For Early Gameboy font */
@font-face {
- font-family: 'Early Gameboy';
- src: url('./fonts/earlyGameboy.ttf')
- font-weight: normal;
- font-style: normal;
+ font-family: "Early Gameboy";
+ src: url("./fonts/earlyGameboy.ttf");
+ font-weight: normal;
+ font-style: normal;
}
/* For Flipps Regular font */
@font-face {
- font-family: 'Flipps Regular';
- src: url('./fonts/flippsRegular.otf')
- font-weight: normal;
- font-style: normal;
+ font-family: "Flipps Regular";
+ src: url("./fonts/flippsRegular.otf");
+ font-weight: normal;
+ font-style: normal;
}
diff --git a/frontend/src/components/hallofame/Canvas.tsx b/frontend/src/components/hallofame/Canvas.tsx
index df1a6a7..e04df80 100644
--- a/frontend/src/components/hallofame/Canvas.tsx
+++ b/frontend/src/components/hallofame/Canvas.tsx
@@ -2,6 +2,7 @@ import React, { useEffect, useRef, useState } from "react";
import { getRandomInt } from "./utils/misc";
import gba from "/largeboy.png";
import { fetchPokemonData } from "./fetchPokemonData";
+import "../../App.css";
let scaleFactor = 1;
let maxX = 0;
let maxY = 0;
@@ -9,6 +10,9 @@ let side: number;
let pointerCanvas: HTMLCanvasElement;
let pointerCtx: CanvasRenderingContext2D;
const pokemonData: {
+ name: string;
+ enrl: string;
+ oneLiner: string;
Pokiname: string;
PokiHeight: number;
PokeSprite: string;
@@ -322,70 +326,124 @@ const Canvas: React.FC = () => {
}
}
function standOutpp() {
- // Load the custom GBA font
- pointerCtx.font = "14px gba"; // Setting the custom font
+ const pokemon = pokemonData[pokeIndex];
- // Set a classic Pokémon color palette
- pointerCtx.fillStyle = "#A8C281"; // Background box color (greenish tone)
+ // Left side color (green)
+ pointerCtx.fillStyle = "#99EDC3";
pointerCtx.fillRect(
- B * pointerCanvas.width, // X-position
- pointerCanvas.height * C, // Y-position
- pointerCanvas.width * D, // Width of box
- pointerCanvas.height * A, // Height of box
+ B * pointerCanvas.width,
+ pointerCanvas.height * C,
+ (pointerCanvas.width * D * 2) / 3,
+ pointerCanvas.height * A,
);
- // Set stroke and text colors for more contrast
- pointerCtx.strokeStyle = "black"; // Outline color
- pointerCtx.fillStyle = "#FFFFFF"; // Text color (white for high contrast)
+ // Setting up the LHS
+ pointerCtx.fillStyle = "black";
+
+ // Split the LHS height into two equal halves
+ const lhsWidth = (pointerCanvas.width * D * 2) / 3;
+ const lhsStartX = B * pointerCanvas.width;
+ const lhsHeight = pointerCanvas.height * A;
+ const lhsHalfHeight = lhsHeight / 2;
+
+ // Pokémon name (heading) - Centered in the top half of LHS
+ pointerCtx.font = "bold 30px roboto";
+ const pokemonName = pokemon.name.toUpperCase();
+ const nameTextWidth = pointerCtx.measureText(pokemonName).width;
+ const nameTextX = lhsStartX + (lhsWidth - nameTextWidth) / 2;
+
+ // Vertically center the heading within the top half
+ const nameTextY = pointerCanvas.height * C + lhsHalfHeight / 2 + 15; // 15 for slight vertical adjustment
+
+ // Draw Pokémon name
+ pointerCtx.fillText(pokemonName, nameTextX, nameTextY);
+
+ // Setting up the one-liner in the bottom half - Centered both vertically and horizontally
+ pointerCtx.font = "20px roboto";
+ const oneLiner = pokemon.oneLiner;
+ const lineHeight = 25; // Line height for multi-line text
+
+ // Function to wrap text and center each line horizontally
+ function wrapTextCentered(context, text, maxWidth, xStart, y, lineHeight) {
+ const words = text.split(" ");
+ let line = "";
+ let testLine;
+ let metrics;
+ let testWidth;
+
+ for (let n = 0; n < words.length; n++) {
+ testLine = line + words[n] + " ";
+ metrics = context.measureText(testLine);
+ testWidth = metrics.width;
+
+ if (testWidth > maxWidth && n > 0) {
+ const lineX =
+ xStart + (maxWidth - context.measureText(line).width) / 2; // Center each line horizontally
+ context.fillText(line, lineX, y);
+ line = words[n] + " ";
+ y += lineHeight;
+ } else {
+ line = testLine;
+ }
+ }
- // Drawing text (center-aligned for better look)
- const textX = pointerCanvas.width * (B + 0.02); // X-position for text
- const textYStart = pointerCanvas.height * (C + 0.05); // Y-start for the name
- const lineSpacing = 20; // Spacing between lines of text
+ const lineX = xStart + (maxWidth - context.measureText(line).width) / 2; // Center last line
+ context.fillText(line, lineX, y);
+ }
- // Display the name "Peter" and roll number in the center of the box
- pointerCtx.fillText(
- "Name: Peter", // Example name
- textX,
- textYStart,
- );
- pointerCtx.fillText(
- "Roll Number: Peter 123", // Example roll number
- textX,
- textYStart + lineSpacing,
+ // Center the one-liner text within the bottom half of LHS
+ const maxTextWidth = lhsWidth - 20; // Slight margin for the text boundaries
+ const oneLinerX = lhsStartX;
+
+ // Vertically center the one-liner in the bottom half
+ const oneLinerY =
+ pointerCanvas.height * C + lhsHalfHeight + lhsHalfHeight / 2;
+
+ wrapTextCentered(
+ pointerCtx,
+ oneLiner,
+ maxTextWidth,
+ oneLinerX,
+ oneLinerY,
+ lineHeight,
);
- // Drawing the Pokémon image (centered in the box)
- const pokeImageX =
- pointerCanvas.width * (B + 0.5) - pointerCanvas.width * D * 0.1; // Center X-position for image
- const pokeImageY = pointerCanvas.height * (C + 0.15); // Y-position for image
- const pokeImageWidth = pointerCanvas.width * D * 0.2; // Width of image
- const pokeImageHeight = pointerCanvas.height * A * 0.5; // Height of image
+ // Right side color (blue-gray)
+ pointerCtx.fillStyle = "#B2C3D2";
+ pointerCtx.fillRect(
+ B * pointerCanvas.width + (pointerCanvas.width * D * 2) / 3 - 3,
+ pointerCanvas.height * C,
+ (pointerCanvas.width * D * 1) / 3,
+ pointerCanvas.height * A,
+ );
+ // The Pokémon image
pointerCtx.drawImage(
- pokemonData[pokeIndex].img,
- pokeImageX,
- pokeImageY,
- pokeImageWidth,
- pokeImageHeight,
+ pokemon.img,
+ B * pointerCanvas.width + (pointerCanvas.width * D * 2) / 3,
+ pointerCanvas.height * C,
+ (pointerCanvas.width * D * 1) / 3,
+ (pointerCanvas.width * D * 1) / 3,
);
- // Adding more text for Pokémon's name, ID, and height (below the image)
- pointerCtx.fillStyle = "#F8E030"; // Use classic Pokémon yellow for name and details
- pointerCtx.fillText(
- "Pokémon: " + pokemonData[pokeIndex].Pokiname,
- textX,
- pokeImageY + pokeImageHeight + lineSpacing, // Below the image
- );
- // pointerCtx.fillText(
- // "ID: " + pokemonData[pokeIndex], // Example PokeID
- // textX,
- // pokeImageY + pokeImageHeight + 2 * lineSpacing, // Next line below the name
- //);
+ // Setting up the Pokémon name text on RHS
+ pointerCtx.fillStyle = "black";
+ pointerCtx.font = "30px roboto";
+
+ const pokemonRHSName = pokemon.Pokiname.toUpperCase();
+ const rhsWidth = (pointerCanvas.width * D * 1) / 3;
+ const textWidth = pointerCtx.measureText(pokemonRHSName).width;
+ const rhsStartX =
+ B * pointerCanvas.width + (pointerCanvas.width * D * 2) / 3;
+ const textX = rhsStartX + (rhsWidth - textWidth) / 2;
+
+ // Draw the Pokémon name centered on RHS
pointerCtx.fillText(
- "Height: " + pokemonData[pokeIndex].PokiHeight + "m", // Example height
+ pokemonRHSName,
textX,
- pokeImageY + pokeImageHeight + 3 * lineSpacing, // Next line below the ID
+ pointerCanvas.height * C +
+ (pointerCanvas.width * D * 1) / 3 +
+ (pointerCanvas.width * D * 1) / 10,
);
}
diff --git a/frontend/src/components/hallofame/fetchPokemonData.ts b/frontend/src/components/hallofame/fetchPokemonData.ts
index b6c00a9..84c6a5b 100644
--- a/frontend/src/components/hallofame/fetchPokemonData.ts
+++ b/frontend/src/components/hallofame/fetchPokemonData.ts
@@ -1,36 +1,34 @@
-import axios from 'axios';
+import axios from "axios";
export const fetchPokemonData = async () => {
- const results = [];
- try {
-
- const response = await axios.get('http://localhost:3000/');
- const users = response.data.userPokemons;
+ const results = [];
+ try {
+ const response = await axios.get("http://localhost:3000/");
+ const users = response.data.userPokemons;
- console.log("users object is: ", users);
+ console.log("users object is: ", users);
- for (let i = 0; i < users.length; i++) {
- const user = users[i];
- try {
-
- const res = await axios.get(`https://pokeapi.co/api/v2/pokemon/${user.number}`);
- results.push({
- ...user,
- Pokiname: res.data.name,
- PokiHeight: res.data.height,
- PokiSprite: res.data.sprites.versions['generation-v']['black-white'].animated.front_default
- });
- } catch (apiError) {
-
- console.error(`API error for Pokémon number ${user.number}`);
- }
- }
- } catch (backendError) {
-
- console.error('Backend reading error:');
+ for (let i = 0; i < users.length; i++) {
+ const user = users[i];
+ try {
+ const res = await axios.get(
+ `https://pokeapi.co/api/v2/pokemon/${user.number}`,
+ );
+ results.push({
+ ...user,
+ Pokiname: res.data.name,
+ PokiHeight: res.data.height,
+ PokiSprite:
+ res.data.sprites.versions["generation-v"]["black-white"].animated
+ .front_default,
+ });
+ } catch (apiError) {
+ console.error(`API error for Pokémon number ${user.number}`);
+ }
}
-
- return results;
-};
-
+ } catch (backendError) {
+ console.error("Backend reading error:");
+ }
+ return results;
+};
diff --git a/frontend/src/components/tutorial/Tutorial.tsx b/frontend/src/components/tutorial/Tutorial.tsx
index 624c387..0a46b10 100644
--- a/frontend/src/components/tutorial/Tutorial.tsx
+++ b/frontend/src/components/tutorial/Tutorial.tsx
@@ -61,7 +61,7 @@ const Tutorial = () => {
-