diff --git a/src/components/Page.tsx b/src/components/Page.tsx new file mode 100644 index 0000000..276f01b --- /dev/null +++ b/src/components/Page.tsx @@ -0,0 +1,33 @@ +import Link from "next/link"; +import type {FunctionComponent} from "react"; +import React from "react"; + +interface PageProps { + children: React.ReactNode; +} + +const Page: FunctionComponent = ({children}: PageProps) => { + return ( + <> +
+
+

100Prisoners.com

+ {children} +
+
+
+ Created by + + Ryan Walters + + +
+
+
+
+
+ + ); +}; + +export default Page; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index cdea073..510eafd 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -2,7 +2,7 @@ import {type NextPage} from "next"; import Head from "next/head"; import BoxTable from "@/components/BoxTable"; import NoSSR from "react-no-ssr"; -import Link from "next/link"; +import Page from "@/components/Page"; const Home: NextPage = () => { return ( @@ -11,58 +11,44 @@ const Home: NextPage = () => { 100prisoners.com -
-
-

100Prisoners.com

-
-

- This website is dedicated to exploring the intriguing 100 prisoners problem, a mathematical - challenge that seems astronomically impossible at first, yet can leverage mathematics to - raise the chances one hundred octillion. -

-

- This thought experiment presents a scenario in which a group of 100 prisoners are tasked - with finding their own numbered slip among a collection of 100 boxes, each containing a - random permutation of the numbers 1 through 100. -

-
    -
  • - Each prisoner is allowed to open 50 boxes. -
  • -
  • - Each prisoner must find their own number within a box, or they fail. -
  • -
  • - All prisoners must be successful - if even one fails, they all lose. -
  • -
  • - Prisoners cannot mark, relay or in any way communicate with each other. -
  • -
-

- Given the premise, the lack of options, and the incredibly tiny odds, one would presume - this challenge to be impossible - but it turns out there is a strategy that guarantees a - 31% chance of success! -

-
-
- - - -
-
-
-
- Created by - - Ryan Walters - - -
-
-
+ +
+

+ This website is dedicated to exploring the intriguing 100 prisoners problem, a mathematical + challenge that seems astronomically impossible at first, yet can leverage mathematics to + raise the chances one hundred octillion. +

+

+ This thought experiment presents a scenario in which a group of 100 prisoners are tasked + with finding their own numbered slip among a collection of 100 boxes, each containing a + random permutation of the numbers 1 through 100. +

+
    +
  • + Each prisoner is allowed to open 50 boxes. +
  • +
  • + Each prisoner must find their own number within a box, or they fail. +
  • +
  • + All prisoners must be successful - if even one fails, they all lose. +
  • +
  • + Prisoners cannot mark, relay or in any way communicate with each other. +
  • +
+

+ Given the premise, the lack of options, and the incredibly tiny odds, one would presume + this challenge to be impossible - but it turns out there is a strategy that guarantees a + 31% chance of success! +

-
+
+ + + +
+ ); };