\documentclass{iditacard}

% True size data
%
% 'Tile' diameter = ~0.5in

\definecolor{stage_one}{HTML}{7FDF7D}
\definecolor{stage_two}{HTML}{9FB76F}
\definecolor{stage_three}{HTML}{5F5FFF}
\definecolor{stage_four}{HTML}{3FDFDF}
\definecolor{stage_five}{HTML}{DFDF3F}
\definecolor{stage_six}{HTML}{9F9F9F}
\definecolor{stage_seven}{HTML}{FF5F5F}
\definecolor{stage_eight}{HTML}{CF5FCF}

\def\cutlinet{1499.5/300.0}
\def\cutlinel{-2395.5/300.0}
\def\cutlineb{-1499.5/300.0}
\def\cutliner{2395.5/300.0}

\def\height{3075.0/300.0}
\def\width{4875.0/300.0}

\def\bottom{-1537.5/300.0}
\def\left{-2437.5/300.0}
\def\top{1537.5/300.0}
\def\right{2437.5/300.0}

\newcommand{\drawoverlay}{%
    \node [opacity=0.2, anchor=south west, inner sep=0mm, outer sep=0mm] at (\left,\bottom) {\includegraphics[angle=90, width=16.25in, height=10.25in] {bigmat.png}};
}

\newcommand{\drawguides}{%
    \draw [blue] (\cutlinel,\bottom) -- (\cutlinel,\top);
    \draw [blue] (\cutliner,\bottom) -- (\cutliner,\top);
    \draw [blue] (\left,\cutlinet) -- (\right,\cutlinet);
    \draw [blue] (\left,\cutlineb) -- (\right,\cutlineb);

    \draw [blue] (0,\bottom) -- (0,\top);
    \draw [blue] (\left,0) -- (\right,0);
}

% draw leg foreground, background draws a leg centered at 0,0
% Bounding box is: -103.75,-128.75 to 103.75,128.75
\newcommand{\drawleg}[2]{%
    % Draw the background as a rectangle
    \fill [#2] (-100.0/300.0,-128.75/300.0) rectangle (100.0/300.0,128.75/300.0);
    % The path is 25.0 wide,        (bottom)        (top)
    %   starts 12.5 units up, goes  (0,12.5)        (0,37.5)
    %   right for 37.5 units,       (37.5,12.5)     (12.5,37.5)
    %   up for 56.25 units,         (37.5,212.5)    (12.5,237.5)
    %   right for 75.0 units,       (62.5,212.5)    (87.5,237.5)
    %   down for 225.0 units,       (62.5,12.5)     (87.5,37.5)
    %   right for 75.0 units,       (137.5,12.5)    (112.5,37.5)
    %   up for 225.0 units,         (137.5,212.5)   (112.5,237.5)
    %   right for 75.0 units,       (162.5,212.5)   (187.5,237.5)
    %   down for 225.0 units,       (162.5,12.5)    (187.5,37.5)
    %   right for 37.5 units.       (200.0,12.5)    (200.0,37.5)
    \fill [#1] (-100.0/300.0,-112.5/300.0) --
               (-62.5/300.0,-112.5/300.0)  --
               (-62.5/300.0,87.5/300.0)    --
               (-37.5/300.0,87.5/300.0)    --
               (-37.5/300.0,-112.5/300.0)  --
               (37.5/300.0,-112.5/300.0)   --
               (37.5/300.0,87.5/300.0)     --
               (62.5/300.0,87.5/300.0)     --
               (62.5/300.0,-112.5/300.0)   --
               (100.0/300.0,-112.5/300.0)  --
               (100.0/300.0,-87.5/300.0)   --
               (87.5/300.0,-87.5/300.0)    --
               (87.5/300.0,112.5/300.0)    --
               (12.5/300.0,112.5/300.0)    --
               (12.5/300.0,-87.5/300.0)    --
               (-12.5/300.0,-87.5/300.0)   --
               (-12.5/300.0,112.5/300.0)   --
               (-87.5/300.0,112.5/300.0)   --
               (-87.5/300.0,-87.5/300.0)   --
               (-100.0/300.0,-87.5/300.0)  -- cycle;

    % Draw the Walls - they stick out to the left

    % Draw the surrounding walls - they are 7.5 units wide
    \fill [black] (-103.75/300.0,-128.75/300.0) --
                  (100.0/300.0,-128.75/300.0)   --
                  (100.0/300.0,-121.25/300.0)   --
                  (53.75/300.0,-121.25/300.0)   --
                  (53.75/300.0,78.75/300.0)     --
                  (46.25/300.0,78.75/300.0)     --
                  (46.25/300.0,-121.25/300.0)   --
                  (-46.25/300.0,-121.25/300.0)  --
                  (-46.25/300.0,78.75/300.0)    --
                  (-53.75/300.0,78.75/300.0)    --
                  (-53.75/300.0,-121.25/300.0)  --
                  (-103.75/300.0,-121.25/300.0) -- cycle;
    \fill [black] (-96.25/300.0,-78.75/300.0)  --
                  (-96.25/300.0,121.25/300.0)  --
                  (-3.75/300.0,121.25/300.0)   --
                  (-3.75/300.0,-78.75/300.0)   --
                  (3.75/300.0,-78.75/300.0)    --
                  (3.75/300.0,121.25/300.0)    --
                  (96.25/300.0,121.25/300.0)   --
                  (96.25/300.0,-78.75/300.0)   --
                  (103.75/300.0,-78.75/300.0)  --
                  (103.75/300.0,128.75/300.0)  --
                  (-103.75/300.0,128.75/300.0) --
                  (-103.75/300.0,-78.75/300.0) -- cycle;

    % Draw the internal walls - they are 2.5x37.5 units
    % Verticals
    \fill [black] (-101.25/300.0,-118.75/300.0) rectangle (-98.75/300.0,-81.25/300.0);
    \fill [black] (-51.25/300.0,81.25/300.0)    rectangle (-48.75/300.0,118.75/300.0);
    \fill [black] (-1.25/300.0,-118.75/300.0)   rectangle (1.25/300.0,-81.25/300.0);
    \fill [black] (48.75/300.0,81.25/300.0)     rectangle (51.25/300.0,118.75/300.0);
    \fill [black] (98.75/300.0,-118.75/300.0)   rectangle (101.25/300.0,-81.25/300.0);

    % Horizontals
    \fill [black] (-93.75/300.0,-76.25/300.0) rectangle (-56.25/300.0,-73.75/300.0);
    \fill [black] (-93.75/300.0,-26.25/300.0) rectangle (-56.25/300.0,-23.75/300.0);
    \fill [black] (-93.75/300.0,23.75/300.0)  rectangle (-56.25/300.0,26.25/300.0);
    \fill [black] (-93.75/300.0,73.75/300.0)  rectangle (-56.25/300.0,76.25/300.0);
    \fill [black] (-43.75/300.0,-76.25/300.0) rectangle (-6.25/300.0,-73.75/300.0);
    \fill [black] (-43.75/300.0,-26.25/300.0) rectangle (-6.25/300.0,-23.75/300.0);
    \fill [black] (-43.75/300.0,23.75/300.0)  rectangle (-6.25/300.0,26.25/300.0);
    \fill [black] (-43.75/300.0,73.75/300.0)  rectangle (-6.25/300.0,76.25/300.0);
    \fill [black] (6.25/300.0,-76.25/300.0)   rectangle (43.75/300.0,-73.75/300.0);
    \fill [black] (6.25/300.0,-26.25/300.0)   rectangle (43.75/300.0,-23.75/300.0);
    \fill [black] (6.25/300.0,23.75/300.0)    rectangle (43.75/300.0,26.25/300.0);
    \fill [black] (6.25/300.0,73.75/300.0)    rectangle (43.75/300.0,76.25/300.0);
    \fill [black] (56.25/300.0,-76.25/300.0)  rectangle (93.75/300.0,-73.75/300.0);
    \fill [black] (56.25/300.0,-26.25/300.0)  rectangle (93.75/300.0,-23.75/300.0);
    \fill [black] (56.25/300.0,23.75/300.0)   rectangle (93.75/300.0,26.25/300.0);
    \fill [black] (56.25/300.0,73.75/300.0)   rectangle (93.75/300.0,76.25/300.0);
}

% draw mid leg foreground, background draws a leg centered at 0,0
% Bounding box is: -103.75,-128.75 to 103.75,128.75
\newcommand{\drawmidleg}[2]{%
    % Draw the background as a rectangle
    \fill [#2] (-100.0/300.0,-125.0/300.0) rectangle (100.0/300.0,125.0/300.0);
    % The path is 25.0 wide,        (bottom)        (top)
    %   starts 12.5 units up, goes  (0,12.5)        (0,37.5)
    %   right for 37.5 units,       (37.5,12.5)     (12.5,37.5)
    %   up for 225.0 units,         (37.5,212.5)    (12.5,237.5)
    %   right for 75.0 units,       (62.5,212.5)    (87.5,237.5)
    %   down for 225.0 units,       (62.5,12.5)     (87.5,37.5)
    %   right for 75.0 units,       (137.5,12.5)    (112.5,37.5)
    %   up for 225.0 units,         (137.5,212.5)   (112.5,237.5)
    %   right for 75.0 units,       (162.5,212.5)   (187.5,237.5)
    %   down for 237.5 units,       (162.5,0)       (187.5,0)
    \fill [#1] (-100.0/300.0,-112.5/300.0) --
               (-62.5/300.0,-112.5/300.0)  --
               (-62.5/300.0,87.5/300.0)    --
               (-37.5/300.0,87.5/300.0)    --
               (-37.5/300.0,-112.5/300.0)  --
               (37.5/300.0,-112.5/300.0)   --
               (37.5/300.0,87.5/300.0)     --
               (62.5/300.0,87.5/300.0)     --
               (62.5/300.0,-125.0/300.0)   --
               (87.5/300.0,-125.0/300.0)   --
               (87.5/300.0,112.5/300.0)    --
               (12.5/300.0,112.5/300.0)    --
               (12.5/300.0,-87.5/300.0)    --
               (-12.5/300.0,-87.5/300.0)   --
               (-12.5/300.0,112.5/300.0)   --
               (-87.5/300.0,112.5/300.0)   --
               (-87.5/300.0,-87.5/300.0)   --
               (-100.0/300.0,-87.5/300.0)  -- cycle;

    % Draw the Walls - they stick out to the left

    % Draw the surrounding walls - they are 7.5 units wide
    \fill [black] (-103.75/300.0,-128.75/300.0) --
                  (53.75/300.0,-128.75/300.0)   --
                  (53.75/300.0,78.75/300.0)     --
                  (46.25/300.0,78.75/300.0)     --
                  (46.25/300.0,-121.25/300.0)   --
                  (-46.25/300.0,-121.25/300.0)  --
                  (-46.25/300.0,78.75/300.0)    --
                  (-53.75/300.0,78.75/300.0)    --
                  (-53.75/300.0,-121.25/300.0)  --
                  (-103.75/300.0,-121.25/300.0) -- cycle;
    \fill [black] (-96.25/300.0,-78.75/300.0)  --
                  (-96.25/300.0,121.25/300.0)  --
                  (-3.75/300.0,121.25/300.0)   --
                  (-3.75/300.0,-78.75/300.0)   --
                  (3.75/300.0,-78.75/300.0)    --
                  (3.75/300.0,121.25/300.0)    --
                  (96.25/300.0,121.25/300.0)   --
                  (96.25/300.0,-128.75/300.0)  --
                  (103.75/300.0,-128.75/300.0) --
                  (103.75/300.0,128.75/300.0)  --
                  (-103.75/300.0,128.75/300.0) --
                  (-103.75/300.0,-78.75/300.0) -- cycle;

    % Draw the internal walls - they are 2.5x37.5 units
    % Verticals
    \fill [black] (-101.25/300.0,-118.75/300.0) rectangle (-98.75/300.0,-81.25/300.0);
    \fill [black] (-51.25/300.0,81.25/300.0)    rectangle (-48.75/300.0,118.75/300.0);
    \fill [black] (-1.25/300.0,-118.75/300.0)   rectangle (1.25/300.0,-81.25/300.0);
    \fill [black] (48.75/300.0,81.25/300.0)     rectangle (51.25/300.0,118.75/300.0);


    % Horizontals
    \fill [black] (-93.75/300.0,-76.25/300.0) rectangle (-56.25/300.0,-73.75/300.0);
    \fill [black] (-93.75/300.0,-26.25/300.0) rectangle (-56.25/300.0,-23.75/300.0);
    \fill [black] (-93.75/300.0,23.75/300.0)  rectangle (-56.25/300.0,26.25/300.0);
    \fill [black] (-93.75/300.0,73.75/300.0)  rectangle (-56.25/300.0,76.25/300.0);
    \fill [black] (-43.75/300.0,-76.25/300.0) rectangle (-6.25/300.0,-73.75/300.0);
    \fill [black] (-43.75/300.0,-26.25/300.0) rectangle (-6.25/300.0,-23.75/300.0);
    \fill [black] (-43.75/300.0,23.75/300.0)  rectangle (-6.25/300.0,26.25/300.0);
    \fill [black] (-43.75/300.0,73.75/300.0)  rectangle (-6.25/300.0,76.25/300.0);
    \fill [black] (6.25/300.0,-76.25/300.0)   rectangle (43.75/300.0,-73.75/300.0);
    \fill [black] (6.25/300.0,-26.25/300.0)   rectangle (43.75/300.0,-23.75/300.0);
    \fill [black] (6.25/300.0,23.75/300.0)    rectangle (43.75/300.0,26.25/300.0);
    \fill [black] (6.25/300.0,73.75/300.0)    rectangle (43.75/300.0,76.25/300.0);
    \fill [black] (56.25/300.0,-126.25/300.0) rectangle (93.75/300.0,-123.75/300.0);
    \fill [black] (56.25/300.0,-76.25/300.0)  rectangle (93.75/300.0,-73.75/300.0);
    \fill [black] (56.25/300.0,-26.25/300.0)  rectangle (93.75/300.0,-23.75/300.0);
    \fill [black] (56.25/300.0,23.75/300.0)   rectangle (93.75/300.0,26.25/300.0);
    \fill [black] (56.25/300.0,73.75/300.0)   rectangle (93.75/300.0,76.25/300.0);
}

% Draws the racetrack itself with speed markers at (0,0)
% Bounding box is (-1615.5,-1215.5) to (1615.5,1215.5)
\newcommand{\drawrace}{%
    \scoped[shift={(-1200.5/300.0,500.5/300.0)},scale=4.0]{\drawleg{stage_one}{stage_eight}}
    \scoped[shift={(-400.5/300.0,500.5/300.0)},scale=4.0]{\drawleg{stage_two}{stage_seven}}
    \scoped[shift={(400.5/300.0,500.5/300.0)},scale=4.0]{\drawleg{stage_three}{stage_six}}

    \scoped[shift={(1200.5/300.0,500.5/300.0)},scale=4.0]{\drawmidleg{stage_four}{stage_five}}
    \scoped[shift={(1200.5/300.0,-500.5/300.0)},xscale=4.0,yscale=-4.0]{\drawmidleg{stage_five}{stage_four}}

    \scoped[shift={(400.5/300.0,-500.5/300.0)},yscale=-4.0,xscale=-4.0]{\drawleg{stage_six}{stage_three}}
    \scoped[shift={(-400.5/300.0,-500.5/300.0)},yscale=-4.0,xscale=-4.0]{\drawleg{stage_seven}{stage_two}}
    \scoped[shift={(-1200.5/300.0,-500.5/300.0)},yscale=-4.0,xscale=-4.0]{\drawleg{stage_eight}{stage_one}}

    % Draw the speed rules
    \fill [black] (-1615.5/300.0,1015.5/300.0) rectangle (-1585.5/300.0,1215.5/300.0);
    \fill [black] (-1415.5/300.0,1015.5/300.0) rectangle (-1385.5/300.0,1215.5/300.0);
    \fill [black] (-1215.5/300.0,1015.5/300.0) rectangle (-1185.5/300.0,1215.5/300.0);
    \fill [black] (-1015.5/300.0,1015.5/300.0) rectangle (-985.5/300.0,1215.5/300.0);
    \fill [black] (-815.5/300.0,1015.5/300.0) rectangle (-785.5/300.0,1215.5/300.0);
    \fill [black] (-615.5/300.0,1015.5/300.0) rectangle (-585.5/300.0,1215.5/300.0);
    \fill [black] (-415.5/300.0,1015.5/300.0) rectangle (-385.5/300.0,1215.5/300.0);
    \fill [black] (-215.5/300.0,1015.5/300.0) rectangle (-185.5/300.0,1215.5/300.0);
    \fill [black] (-15.5/300.0,1015.5/300.0) rectangle (15.5/300.0,1215.5/300.0);
    \fill [black] (185.5/300.0,1015.5/300.0) rectangle (215.5/300.0,1215.5/300.0);
    \fill [black] (385.5/300.0,1015.5/300.0) rectangle (415.5/300.0,1215.5/300.0);
    \fill [black] (585.5/300.0,1015.5/300.0) rectangle (615.5/300.0,1215.5/300.0);
    \fill [black] (785.5/300.0,1015.5/300.0) rectangle (815.5/300.0,1215.5/300.0);
    \fill [black] (985.5/300.0,1015.5/300.0) rectangle (1015.5/300.0,1215.5/300.0);
    \fill [black] (1185.5/300.0,1015.5/300.0) rectangle (1215.5/300.0,1215.5/300.0);
    \fill [black] (1385.5/300.0,1015.5/300.0) rectangle (1415.5/300.0,1215.5/300.0);
    \fill [black] (1585.5/300.0,1015.5/300.0) rectangle (1615.5/300.0,1215.5/300.0);

    \fill [black] (-1615.5/300.0,-1215.5/300.0) rectangle (-1585.5/300.0,-1015.5/300.0);
    \fill [black] (-1415.5/300.0,-1215.5/300.0) rectangle (-1385.5/300.0,-1015.5/300.0);
    \fill [black] (-1215.5/300.0,-1215.5/300.0) rectangle (-1185.5/300.0,-1015.5/300.0);
    \fill [black] (-1015.5/300.0,-1215.5/300.0) rectangle (-985.5/300.0,-1015.5/300.0);
    \fill [black] (-815.5/300.0,-1215.5/300.0) rectangle (-785.5/300.0,-1015.5/300.0);
    \fill [black] (-615.5/300.0,-1215.5/300.0) rectangle (-585.5/300.0,-1015.5/300.0);
    \fill [black] (-415.5/300.0,-1215.5/300.0) rectangle (-385.5/300.0,-1015.5/300.0);
    \fill [black] (-215.5/300.0,-1215.5/300.0) rectangle (-185.5/300.0,-1015.5/300.0);
    \fill [black] (-15.5/300.0,-1215.5/300.0) rectangle (15.5/300.0,-1015.5/300.0);
    \fill [black] (185.5/300.0,-1215.5/300.0) rectangle (215.5/300.0,-1015.5/300.0);
    \fill [black] (385.5/300.0,-1215.5/300.0) rectangle (415.5/300.0,-1015.5/300.0);
    \fill [black] (585.5/300.0,-1215.5/300.0) rectangle (615.5/300.0,-1015.5/300.0);
    \fill [black] (785.5/300.0,-1215.5/300.0) rectangle (815.5/300.0,-1015.5/300.0);
    \fill [black] (985.5/300.0,-1215.5/300.0) rectangle (1015.5/300.0,-1015.5/300.0);
    \fill [black] (1185.5/300.0,-1215.5/300.0) rectangle (1215.5/300.0,-1015.5/300.0);
    \fill [black] (1385.5/300.0,-1215.5/300.0) rectangle (1415.5/300.0,-1015.5/300.0);
    \fill [black] (1585.5/300.0,-1215.5/300.0) rectangle (1615.5/300.0,-1015.5/300.0);

    % Add the numbers
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-1500.5/300.0,1115.5/300.0) {-5};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-1300.5/300.0,1115.5/300.0) {-4};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-1100.5/300.0,1115.5/300.0) {-3};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-900.5/300.0,1115.5/300.0) {-2};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-700.5/300.0,1115.5/300.0) {-1};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-500.5/300.0,1115.5/300.0) {0};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-300.5/300.0,1115.5/300.0) {+1};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-100.5/300.0,1115.5/300.0) {+2};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (100.5/300.0,1115.5/300.0) {+3};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (300.5/300.0,1115.5/300.0) {+4};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (500.5/300.0,1115.5/300.0) {+5};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (700.5/300.0,1115.5/300.0) {+6};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (900.5/300.0,1115.5/300.0) {+7};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (1100.5/300.0,1115.5/300.0) {+8};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (1300.5/300.0,1115.5/300.0) {+9};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (1500.5/300.0,1115.5/300.0) {+10};

    \node [align=center, font=\fontsize{24}{0}\bebas] at (-1500.5/300.0,-1115.5/300.0) {-50};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-1300.5/300.0,-1115.5/300.0) {-40};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-1100.5/300.0,-1115.5/300.0) {-30};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-900.5/300.0,-1115.5/300.0) {-20};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-700.5/300.0,-1115.5/300.0) {-10};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-500.5/300.0,-1115.5/300.0) {0};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-300.5/300.0,-1115.5/300.0) {+10};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (-100.5/300.0,-1115.5/300.0) {+20};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (100.5/300.0,-1115.5/300.0) {+30};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (300.5/300.0,-1115.5/300.0) {+40};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (500.5/300.0,-1115.5/300.0) {+50};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (700.5/300.0,-1115.5/300.0) {+60};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (900.5/300.0,-1115.5/300.0) {+70};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (1100.5/300.0,-1115.5/300.0) {+80};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (1300.5/300.0,-1115.5/300.0) {+90};
    \node [align=center, font=\fontsize{24}{0}\bebas] at (1500.5/300.0,-1115.5/300.0) {+100};

    % Add the checkpoints
    \node [align=center] at (-1500.5/300.0,100.5/300.0) {\includegraphics{images/rules/checkpoint.png}};
    \node [align=center] at (-700.5/300.0,100.5/300.0) {\includegraphics{images/rules/checkpoint.png}};
    \node [align=center] at (100.5/300.0,100.5/300.0) {\includegraphics{images/rules/checkpoint.png}};
    \node [align=center] at (900.5/300.0,100.5/300.0) {\includegraphics{images/rules/checkpoint.png}};
    \node [align=center] at (1500.5/300.0,-100.5/300.0) {\includegraphics{images/rules/checkpoint.png}};
}

% Draws an empty leg centered on (0,0)
% Bounding box is (-375.0,-262.5) to (375.0,262.5)
\newcommand{\emptystage}[2]{%
    \fill [left color=#2, right color=#1] (-375.0/300.0,-262.5/300.0) rectangle (375.0/300.0,262.5/300.0);
    \fill [rounded corners=10pt] [#1] (-325.0/300.0,-212.5/300.0) rectangle (-25.0/300.0,222.5/300.0);
    \fill [rounded corners=10pt] [#2] (25.0/300.0,-212.5/300.0) rectangle (325.0/300.0,222.5/300.0);
}

% Draws a 5x5 checker pattern of 30x30 squares centered on (0,0)
% Bounding box is (-75.0,-75.0) to (75.0,75.0)
\newcommand{\drawchecker}{%
    % Top row
    \fill [black] (45.0/300.0,45.0/300.0) rectangle (75.0/300.0,75.0/300.0);
    \fill [white] (15.0/300.0,45.0/300.0) rectangle (45.0/300.0,75.0/300.0);
    \fill [black] (-15.0/300.0,45.0/300.0) rectangle (15.0/300.0,75.0/300.0);
    \fill [white] (-45.0/300.0,45.0/300.0) rectangle (-15.0/300.0,75.0/300.0);
    \fill [black] (-75.0/300.0,45.0/300.0) rectangle (-45.0/300.0,75.0/300.0);
    % High row
    \fill [white] (45.0/300.0,15.0/300.0) rectangle (75.0/300.0,45.0/300.0);
    \fill [black] (15.0/300.0,15.0/300.0) rectangle (45.0/300.0,45.0/300.0);
    \fill [white] (-15.0/300.0,15.0/300.0) rectangle (15.0/300.0,45.0/300.0);
    \fill [black] (-45.0/300.0,15.0/300.0) rectangle (-15.0/300.0,45.0/300.0);
    \fill [white] (-75.0/300.0,15.0/300.0) rectangle (-45.0/300.0,45.0/300.0);
    % Center row
    \fill [black] (45.0/300.0,-15.0/300.0) rectangle (75.0/300.0,15.0/300.0);
    \fill [white] (15.0/300.0,-15.0/300.0) rectangle (45.0/300.0,15.0/300.0);
    \fill [black] (-15.0/300.0,-15.0/300.0) rectangle (15.0/300.0,15.0/300.0);
    \fill [white] (-45.0/300.0,-15.0/300.0) rectangle (-15.0/300.0,15.0/300.0);
    \fill [black] (-75.0/300.0,-15.0/300.0) rectangle (-45.0/300.0,15.0/300.0);
    % Low row
    \fill [white] (45.0/300.0,-45.0/300.0) rectangle (75.0/300.0,-15.0/300.0);
    \fill [black] (15.0/300.0,-45.0/300.0) rectangle (45.0/300.0,-15.0/300.0);
    \fill [white] (-15.0/300.0,-45.0/300.0) rectangle (15.0/300.0,-15.0/300.0);
    \fill [black] (-45.0/300.0,-45.0/300.0) rectangle (-15.0/300.0,-15.0/300.0);
    \fill [white] (-75.0/300.0,-45.0/300.0) rectangle (-45.0/300.0,-15.0/300.0);
    % Bottom row
    \fill [black] (45.0/300.0,-75.0/300.0) rectangle (75.0/300.0,-45.0/300.0);
    \fill [white] (15.0/300.0,-75.0/300.0) rectangle (45.0/300.0,-45.0/300.0);
    \fill [black] (-15.0/300.0,-75.0/300.0) rectangle (15.0/300.0,-45.0/300.0);
    \fill [white] (-45.0/300.0,-75.0/300.0) rectangle (-15.0/300.0,-45.0/300.0);
    \fill [black] (-75.0/300.0,-75.0/300.0) rectangle (-45.0/300.0,-45.0/300.0);
}

% Draws the hypothermia chart centered on (0,0)
% Bounding box is (-150,-650) to (150,650)
\newcommand{\drawhypochart}{%
    \node [anchor=center, font=\fontsize{14}{0}\bebas] at (0,-650.0/300.0) {WARM};
    \fill [energy, rounded corners] (-150.0/300.0,-615.0/300.0) rectangle (150.0/300.0,-585.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-500.0/300.0) {\speed{-1}};
    \fill [energy, rounded corners] (-150.0/300.0,-415.0/300.0) rectangle (150.0/300.0,-385.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-300.0/300.0) {\includegraphics[width=0.5in,height=0.5in]{icons/hand.png}};
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-300.0/300.0) {+1};
    \fill [energy, rounded corners] (-150.0/300.0,-215.0/300.0) rectangle (150.0/300.0,-185.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-100.0/300.0) {\speed{-1}};
    \fill [energy, rounded corners] (-150.0/300.0,-15.0/300.0) rectangle (150.0/300.0,15.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,100.0/300.0) {\includegraphics[width=0.5in,height=0.5in]{icons/hand.png}};
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,100.0/300.0) {+1};
    \fill [energy, rounded corners] (-150.0/300.0,185.0/300.0) rectangle (150.0/300.0,215.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,300.0/300.0) {\speed{-1}};
    \fill [energy, rounded corners] (-150.0/300.0,385.0/300.0) rectangle (150.0/300.0,415.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,500.0/300.0) {\includegraphics[width=0.5in,height=0.5in]{icons/hand.png}};
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,500.0/300.0) {+1};
    %\fill [energy, rounded corners] (-150.0/300.0,585.0/300.0) rectangle (150.0/300.0,615.0/300.0);
}

% Draws the starvation chart centered on (0,0)
% Bounding box is (-150,-650) to (150,650)
\newcommand{\drawstarvechart}{%
    \node [anchor=center, font=\fontsize{14}{0}\bebas] at (0,-650.0/300.0) {FULL};
    \fill [health, rounded corners] (-150.0/300.0,-615.0/300.0) rectangle (150.0/300.0,-585.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-500.0/300.0) {\speed{-1}};
    \fill [health, rounded corners] (-150.0/300.0,-415.0/300.0) rectangle (150.0/300.0,-385.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-300.0/300.0) {\includegraphics[width=0.5in,height=0.5in]{icons/deck.png}};
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-300.0/300.0) {+1};
    \fill [health, rounded corners] (-150.0/300.0,-215.0/300.0) rectangle (150.0/300.0,-185.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,-100.0/300.0) {\speed{-1}};
    \fill [health, rounded corners] (-150.0/300.0,-15.0/300.0) rectangle (150.0/300.0,15.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,100.0/300.0) {\includegraphics[width=0.5in,height=0.5in]{icons/deck.png}};
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,100.0/300.0) {+1};
    \fill [health, rounded corners] (-150.0/300.0,185.0/300.0) rectangle (150.0/300.0,215.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,300.0/300.0) {\speed{-1}};
    \fill [health, rounded corners] (-150.0/300.0,385.0/300.0) rectangle (150.0/300.0,415.0/300.0);
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,500.0/300.0) {\includegraphics[width=0.5in,height=0.5in]{icons/deck.png}};
    \node [anchor=center, font=\fontsize{20}{0}\bebas] at (0,500.0/300.0) {+1};
    %\fill [health, rounded corners] (-150.0/300.0,585.0/300.0) rectangle (150.0/300.0,615.0/300.0);
}

\newcommand{\drawhypostarvechart}{%
    \scoped[shift={(-175.0/300.0,0.0/300.0)}]{\drawstarvechart}
    \scoped[shift={(175.0/300.0,0.0/300.0)}]{\drawhypochart}
    \node [anchor=center, font=\fontsize{48}{0}\bebas] at (0,700.0/300.0) {\move{}};
    \draw [red, line width=0.05in] (0,700.0/300.0) circle (0.4);
    \draw [red, line width=0.05in] (-84.0/300.0,784.0/300.0) -- (84.0/300.0,616.0/300.0);
    % TODO
}

\begin{document}
\begin{board}

% Draw the race
\scoped[shift={(0,0)}]{\drawrace}

% Draw the Stages
\scoped[shift={(2005.5/300.0,953.0/300.0)}]{\emptystage{stage_one}{stage_eight}}
\scoped[shift={(2005.5/300.0,317.6/300.0)}]{\emptystage{stage_two}{stage_seven}}
\scoped[shift={(2005.5/300.0,-317.6/300.0)}]{\emptystage{stage_three}{stage_six}}
\scoped[shift={(2005.5/300.0,-953.0/300.0)}]{\emptystage{stage_four}{stage_five}}

% Draw the Start/End
\scoped[shift={(-1690.5/300.0,-100.5/300.0)}]{\drawchecker}
\node [anchor=east, inner sep=0mm, font=\fontsize{24}{0}\bebas] at (-1615.5/300.0,100.5/300.0) {Start};

\scoped[shift={(-1975.0/300.0,-750.0/300.0)}]{\drawhypostarvechart}

% TODO: Remove these, they are for 'debugging'
\drawoverlay
\drawguides

\end{board}
\end{document}
