Merge pull request #2 from techieAgnostic/Refactor
First Actual Release
This commit is contained in:
commit
5341fc26e6
223
Main.hs
223
Main.hs
@ -31,56 +31,197 @@ instance Yesod Chhf
|
||||
inBoth :: (Eq a) => [a] -> [a] -> [a]
|
||||
inBoth x y = filter (\n -> n `elem` y) x
|
||||
|
||||
showMonth :: Int -> String
|
||||
showMonth 1 = "January"
|
||||
showMonth 2 = "February"
|
||||
showMonth 3 = "March"
|
||||
showMonth 4 = "April"
|
||||
showMonth 5 = "May"
|
||||
showMonth 6 = "June"
|
||||
showMonth 7 = "July"
|
||||
showMonth 8 = "August"
|
||||
showMonth 9 = "September"
|
||||
showMonth 10 = "October"
|
||||
showMonth 11 = "November"
|
||||
showMonth 12 = "December"
|
||||
|
||||
getHomeR :: Handler Html
|
||||
getHomeR = do
|
||||
t <- io $ getCurrentTime >>= return . toGregorian . utctDay
|
||||
let ts = toTS t
|
||||
getHomeR = defaultLayout $ do
|
||||
(year, month, day) <- io $ getCurrentTime >>= return . toGregorian . utctDay
|
||||
let nextMonth = (month + 1) `mod` 12
|
||||
let ts = toTS (year, month, day)
|
||||
let ((i,o),b,r) = currentFormat ts
|
||||
let bx = (\(Bq x) -> x)
|
||||
let (_,ib,_) = initialRotation
|
||||
let bbout = map show $ catMaybes $ inBoth (bx ib) (tail $ bx b)
|
||||
let dpout = sort $ map show $ map (\(Ir n) -> n) i
|
||||
let pr = getPreview ts
|
||||
defaultLayout [whamlet|
|
||||
<h1>CHHF - A Dunedin Netrunner Format
|
||||
<h2>About
|
||||
<p>The Chris Hay Honourary Format, a post-cancellation Netrunner format. #
|
||||
The format consists of 18 packs at any time, and between 5 and 6 big boxes. #
|
||||
The following rotation rules are in place:
|
||||
<ul>
|
||||
<li> Each month, the two packs that have been in rotation longest are rotated out, and two random packs are rotated in
|
||||
<li> After a pack rotates out, it cannot rotate in for 3 months
|
||||
<li> Each month, in release order, one big box (Including Terminal Directive) is banned for the month
|
||||
<li> On the seventh month, all big boxes are legal
|
||||
<p> The rotation updates on the first of each month, based on whatever time my server is set to (Probably NZ time but who knows really), and from the 20th of each month onwards, a preview of the upcoming changes will be shown.
|
||||
<h2>Current Rotation:
|
||||
<h3>Evergreen:
|
||||
<ul>
|
||||
<li>Revised Core Set x3
|
||||
<h3>Big Boxes:
|
||||
<ul>
|
||||
$forall bb <- bbout
|
||||
<li>#{bb}
|
||||
<h3>Data-packs:
|
||||
<ul>
|
||||
$forall dp <- dpout
|
||||
<li>#{dp}
|
||||
<h2>Upcoming Changes:
|
||||
$maybe (pin, pout, pbin, pbout) <- pr
|
||||
<h3>In:
|
||||
setTitle "Protocol Seven"
|
||||
toWidget [lucius|
|
||||
html {
|
||||
color: #FFFFFF;
|
||||
background-color: #222222;
|
||||
font-family: 'Inconsolata', monospace;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 740px;
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
text-align: left;
|
||||
border-left: 4px solid white;
|
||||
border-right: 4px solid white;
|
||||
}
|
||||
|
||||
section {
|
||||
border-top: 4px solid white;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
header {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
border-top: 4px solid white;
|
||||
}
|
||||
|
||||
.subheading {
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
p,h2,h3 {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
ul {
|
||||
text-align: initial;
|
||||
}
|
||||
|
||||
.current {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.currentFormat {
|
||||
margin: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.currentLeft {
|
||||
width: 300px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.currentRight {
|
||||
margin-left: 300px;
|
||||
}
|
||||
|
||||
.upcoming {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.changes {
|
||||
margin: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.upcomingIn {
|
||||
color: #00DD00;
|
||||
background-color: inherit;
|
||||
width: 300px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.upcomingOut {
|
||||
color: #DD0000;
|
||||
background-color: inherit;
|
||||
margin-left: 300px;
|
||||
}
|
||||
|]
|
||||
addScriptRemote "https://fonts.googleapis.com/css?family=Inconsolata"
|
||||
toWidgetBody [hamlet|
|
||||
<header>
|
||||
<h1>Protocol Seven
|
||||
<p class="subheading">Always Be Running</p>
|
||||
|]
|
||||
toWidgetBody [hamlet|
|
||||
<section class="rotation">
|
||||
<div class="current">
|
||||
<h2>Format for #{showMonth month} #{year}:
|
||||
<div class="currentFormat">
|
||||
<div class="currentLeft">
|
||||
<h3>Evergreen:
|
||||
<ul>
|
||||
<li>Revised Core Set x3
|
||||
<h3>Big Boxes:
|
||||
<ul>
|
||||
$forall bb <- bbout
|
||||
<li>#{bb}
|
||||
<div class="currentRight">
|
||||
<h3>Data-packs:
|
||||
<ul>
|
||||
$forall dp <- dpout
|
||||
<li>#{dp}
|
||||
<div class="upcoming">
|
||||
<h2>Upcoming Changes for #{showMonth nextMonth} #{year}:
|
||||
$maybe (pin, pout, pbin, pbout) <- pr
|
||||
<div class="changes">
|
||||
<div class="upcomingIn">
|
||||
<h3>In:
|
||||
<ul>
|
||||
$maybe pbbin <- pbin
|
||||
<li>+ #{show pbbin}
|
||||
$forall indp <- pin
|
||||
<li>+ #{show indp}
|
||||
<div class="upcomingOut">
|
||||
<h3>Out:
|
||||
<ul>
|
||||
$maybe pbbout <- pbout
|
||||
<li>- #{show pbbout}
|
||||
$forall outdp <- pout
|
||||
<li>- #{show outdp}
|
||||
$nothing
|
||||
<h3>Coming soon!
|
||||
|]
|
||||
toWidgetBody [hamlet|
|
||||
<section class="about">
|
||||
<h2>What is Protocol Seven?
|
||||
<blockquote><em>"No matter where you go, everybody's connected."</em> - Lain Iwakura
|
||||
<p>For many of us, Fantasy Flight Games' Living Card Game <strong>Android: Netrunner</strong> was more than simply a card game. The term <em>Lifestyle Game</em> has been thrown around a lot, but is truer for no other community than that of <strong>ANR</strong>. Without the influx of things to discuss each month, it may seem likely that the community will die, however this is only true if we let it happen.
|
||||
<p>With the cancellation of many players favourite game, and no real replacement anywhere on the horizon, all that's left is to create our own points of discussion. Many players are working on custom cycles to expand the card pool, however one <strong>Chris Hay</strong> of the small and oft ridiculed meta from <strong>Dunedin, New Zealand</strong> has come up with a solution; an everchanging format using the current completed card pool.
|
||||
<h2>How does it work?
|
||||
<blockquote><em>"One theory says that man is a neoteny and is no longer able to evolve. If this is true, then what an absurd creature mankind has evolved into."</em> - Eiri Masami
|
||||
<p><strong>Protocol Seven</strong> is an attempt at a constantly evolving metagame. Rather than relying on an influx of new cards every month, <strong>Protocol Seven</strong> relies on a monthly rotation schedule. This allows discussion of a new metagame every month for the forseeable future.
|
||||
<p>A month's format in <strong>Protocol Seven</strong> will at any time consist of the following:
|
||||
<ul>
|
||||
$maybe pbbin <- pbin
|
||||
<li>#{show pbbin}
|
||||
$forall indp <- pin
|
||||
<li>#{show indp}
|
||||
<h3>Out:
|
||||
<li>3x Revised Core Set
|
||||
<li>18x Data Packs from the Lunar - Kitara cycles
|
||||
<li>5-6x Deluxe Boxes (Including Terminal Directive)
|
||||
<p>This website will automatically update with the latest format, as well as a preview of the next months changes. This allows discussion, an ever-changing metagame, whilst also keeping the card pool similar enough between months that decks can be altered rather than completely remade.
|
||||
<h2>The Protocol Seven Protocol
|
||||
<blockquote><em>"But a protocol is nothing more than a simple agreement."</em> - Eiri Masami
|
||||
<p>A comprehensive description of the <strong>Protocol Seven</strong> format
|
||||
<ul>
|
||||
$maybe pbbout <- pbout
|
||||
<li>#{show pbbout}
|
||||
$forall outdp <- pout
|
||||
<li>#{show outdp}
|
||||
$nothing
|
||||
<h3>Coming soon!
|
||||
<li>3x Revised Core Sets will be legal at all times
|
||||
<li>The most recent FFG Most Wanted List will be active at all times
|
||||
<li>The Genesis and Spin cycles are not legal
|
||||
<li>Cards from the Original Core Set that are not in the Revised Core Set are not legal
|
||||
<li>18x of the 36 Data Packs from Lunar cycle onwards will be legal at all times
|
||||
<li>Each rotation will remove the two Data Packs that have been in play the longest, and replace them with two, randomly chosen packs
|
||||
<li>Once rotated out, a Data Pack will not rotate in for at least three months
|
||||
<li>Each rotation, one Deluxe Box (Including Terminal Directive), in release order, will be chosen as illegal
|
||||
<li>Every 7th rotation, all Deluxes will be legal instead
|
||||
<li>The rotation will happen on the 1st of every month, New Zealand time
|
||||
<li>On the 20th of every month, a preview of the next months format will be shown
|
||||
<li><del>No matter what the currently legal packs are, Door to Door (Escalation #59) will always be legal</del>
|
||||
|]
|
||||
|
||||
main :: IO ()
|
||||
|
87
style.css
Normal file
87
style.css
Normal file
@ -0,0 +1,87 @@
|
||||
html {
|
||||
color: #FFFFFF;
|
||||
background-color: #222222;
|
||||
font-family: 'Inconsolata', monospace;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 740px;
|
||||
margin: auto;
|
||||
padding: 20px;
|
||||
text-align: left;
|
||||
border-left: 4px solid white;
|
||||
border-right: 4px solid white;
|
||||
}
|
||||
|
||||
section {
|
||||
border-top: 4px solid white;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
header {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
border-top: 4px solid white;
|
||||
}
|
||||
|
||||
.subheading {
|
||||
text-align: center;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
text-align: center;
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
p,h2,h3 {
|
||||
margin: 0px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
ul {
|
||||
text-align: initial;
|
||||
}
|
||||
|
||||
.current {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.currentFormat {
|
||||
margin: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.currentLeft {
|
||||
width: 300px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.currentRight {
|
||||
margin-left: 300px;
|
||||
}
|
||||
|
||||
.upcoming {
|
||||
width: 600px;
|
||||
}
|
||||
|
||||
.changes {
|
||||
margin: auto;
|
||||
padding: 1px;
|
||||
}
|
||||
|
||||
.upcomingIn {
|
||||
color: #00DD00;
|
||||
background-color: inherit;
|
||||
width: 300px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.upcomingOut {
|
||||
color: #DD0000;
|
||||
background-color: inherit;
|
||||
margin-left: 300px;
|
||||
}
|
130
test.html
Normal file
130
test.html
Normal file
@ -0,0 +1,130 @@
|
||||
<!DOCTYPE html>
|
||||
<!-- saved from url=(0026)http://techieagnostic.com/ -->
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<title>Protocol Seven</title>
|
||||
<link href="style.css" rel="stylesheet" type="text/css">
|
||||
<link href="https://fonts.googleapis.com/css?family=Inconsolata" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
<h1>Protocol Seven</h1>
|
||||
<p class="subheading">(Formerly the <em>Chris Hay Honourary Format</em>)</p>
|
||||
</header>
|
||||
<section class="rotation">
|
||||
<div class="current">
|
||||
<h2>Format for June 2018:</h2>
|
||||
<div class="currentFormat">
|
||||
<div class="currentLeft">
|
||||
<h3>Evergreen:</h3>
|
||||
<ul>
|
||||
<li>Revised Core Set x3</li>
|
||||
</ul>
|
||||
<h3>Big Boxes:</h3>
|
||||
<ul>
|
||||
<li>Creation and Control</li>
|
||||
<li>Honor and Profit</li>
|
||||
<li>Data and Destiny</li>
|
||||
<li>Terminal Directive</li>
|
||||
<li>Reign and Reverie</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="currentRight">
|
||||
<h3>Data-packs:</h3>
|
||||
<ul>
|
||||
<li>Breaker Bay</li>
|
||||
<li>Chrome City</li>
|
||||
<li>Council of the Crest</li>
|
||||
<li>Democracy and Dogma</li>
|
||||
<li>Down the White Nile</li>
|
||||
<li>Earth's Scion</li>
|
||||
<li>Fear the Masses</li>
|
||||
<li>Kala Ghoda</li>
|
||||
<li>Kampala Ascendent</li>
|
||||
<li>Martial Law</li>
|
||||
<li>Old Hollywood</li>
|
||||
<li>Quorum</li>
|
||||
<li>Sovereign Sight</li>
|
||||
<li>The Liberated Mind</li>
|
||||
<li>The Source</li>
|
||||
<li>The Spaces Between</li>
|
||||
<li>The Underway</li>
|
||||
<li>Upstalk</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="upcoming">
|
||||
<h2>Upcoming Changes for July 2018:</h2>
|
||||
<div class="changes">
|
||||
<div class="upcomingIn">
|
||||
<h3>In:</h3>
|
||||
<ul>
|
||||
<li>+ Order and Chaos</li>
|
||||
<li>+ The Universe of Tomorrow</li>
|
||||
<li>+ The Devil and the Dragon</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="upcomingOut">
|
||||
<h3>Out:</h3>
|
||||
<ul>
|
||||
<li>- Data and Destiny</li>
|
||||
<li>- The Liberated Mind</li>
|
||||
<li>- Kampala Ascendent</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="about">
|
||||
<h2>What is Protocol Seven?</h2>
|
||||
<blockquote>
|
||||
<em>"No matter where you go, everybody's connected."</em> - Lain Iwakura
|
||||
</blockquote>
|
||||
<p>
|
||||
For many of us, Fantasy Flight Games' Living Card Game <strong>Android: Netrunner</strong> was more than simply a card game. The term <em>Lifestyle Game</em> has been thrown around a lot, but is truer for no other community than that of <strong>ANR</strong>. Without the influx of things to discuss each month, it may seem likely that the community will die, however this is only true if we let it happen.
|
||||
</p>
|
||||
<p>
|
||||
With the cancellation of many players favourite game, and no real replacement anywhere on the horizon, all that's left is to create our own points of discussion. Many players are working on custom cycles to expand the card pool, however one <strong>Chris Hay</strong> of the small and oft ridiculed meta from <strong>Dunedin, New Zealand</strong> has come up with a solution; an everchanging format using the current completed card pool.
|
||||
</p>
|
||||
<h2>How does it work?</h2>
|
||||
<blockquote>
|
||||
<em>"One theory says that man is a neoteny and is no longer able to evolve. If this is true, then what an absurd creature mankind has evolved into."</em> - Eiri Masami
|
||||
</blockquote>
|
||||
<p>
|
||||
<strong>Protocol Seven</strong> is an attempt at a constantly evolving metagame. Rather than relying on an influx of new cards every month, <strong>Protocol Seven</strong> relies on a monthly rotation schedule. This allows discussion of a new metagame every month for the forseeable future.
|
||||
</p>
|
||||
<p>
|
||||
A month's format in <strong>Protocol Seven</strong> will at any time consist of the following:
|
||||
<ul>
|
||||
<li>3x Revised Core Set</li>
|
||||
<li>18x Data Packs from the Lunar - Kitara cycles</li>
|
||||
<li>5-6x Deluxe Boxes (Including Terminal Directive)</li>
|
||||
</ul>
|
||||
This website will automatically update with the latest format, as well as a preview of the next months changes. This allows discussion, an ever-changing metagame, whilst also keeping the card pool similar enough between months that decks can be altered rather than completely remade.
|
||||
</p>
|
||||
<h2>The Protocol Seven Protocol</h2>
|
||||
<blockquote>
|
||||
<em>"But a protocol is nothing more than a simple agreement."</em> - Eiri Masami
|
||||
</blockquote>
|
||||
<p>
|
||||
A comprehensive description of the <strong>Protocol Seven</strong> format
|
||||
</p>
|
||||
<ul>
|
||||
<li>3x Revised Core Sets will be legal at all times</li>
|
||||
<li>The most recent FFG Most Wanted List will be active at all times</li>
|
||||
<li>The Genesis and Spin cycles are not legal</li>
|
||||
<li>Cards from the Original Core Set that are not in the Revised Core Set are not legal</li>
|
||||
<li>18x of the 36 Data Packs from Lunar cycle onwards will be legal at all times</li>
|
||||
<li>Each rotation will remove the two Data Packs that have been in play the longest, and replace them with two, randomly chosen packs</li>
|
||||
<li>Once rotated out, a Data Pack will not rotate in for at least three months</li>
|
||||
<li>Each rotation, one Deluxe Box (Including Terminal Directive), in release order, will be chosen as illegal</li>
|
||||
<li>Every 7th rotation, all Deluxes will be legal instead</li>
|
||||
<li>The rotation will happen on the 1st of every month, New Zealand time</li>
|
||||
<li>On the 20th of every month, a preview of the next months format will be shown</li>
|
||||
<li><del>No matter what the currently legal packs are, Door to Door (Escalation #59) will always be legal</del></li>
|
||||
</ul>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user