Refactor retrograde
This commit is contained in:
@ -13,6 +13,47 @@
|
||||
\usepackage{afterpage}
|
||||
\usepackage[hang]{footmisc}
|
||||
|
||||
% A row of stars, for showing difficulty
|
||||
% first arg: filled stars
|
||||
% second arg: total stars
|
||||
\def\liststars#1#2{%
|
||||
\def\oncolor{\color{ogrape}}%
|
||||
\def\offcolor{\color{white}}%
|
||||
%
|
||||
\count255=1%
|
||||
\count254=#2%
|
||||
\advance\count254 by -1%
|
||||
\ifnum #1 > 0
|
||||
% The $$ are required around \bigstar.
|
||||
% the special \odot chess piece breaks
|
||||
% star sizing if they are ommited.
|
||||
\loop
|
||||
{\oncolor $\bigstar$}%
|
||||
\ifnum\count255 < #1
|
||||
\advance\count255 by 1
|
||||
\repeat%
|
||||
\else%
|
||||
{\oncolor $\bigstar$}%
|
||||
\fi%
|
||||
%
|
||||
\ifnum \count255 < #2%
|
||||
\loop
|
||||
{\offcolor $\bigstar$}%
|
||||
\ifnum\count255 < \count254
|
||||
\advance\count255 by 1
|
||||
\repeat%
|
||||
\fi%
|
||||
}
|
||||
|
||||
|
||||
\def\startimes#1{
|
||||
{\color{ogrape} $\bigstar \times #1$}
|
||||
}
|
||||
|
||||
\def\starvalue#1{
|
||||
\stars{#1}{#1} \par
|
||||
\vspace{1mm}
|
||||
}
|
||||
|
||||
\def\difficulty#1#2{
|
||||
\textbf{Difficulty:} \stars{#1}{#2} \par
|
||||
@ -60,8 +101,20 @@ $\odot$}}
|
||||
\chessboard[setpieces = {#1}]
|
||||
\fi
|
||||
}
|
||||
\makeatother
|
||||
|
||||
\@makeORMCbox{hintlist}
|
||||
{Available Hints}
|
||||
{black!12!white}
|
||||
{black!80!white}
|
||||
|
||||
\long\def\hintcontent#1#2#3{
|
||||
\if@solutions
|
||||
\liststars{#1}{#2} \par #3
|
||||
\else
|
||||
\liststars{#1}{#2}
|
||||
\fi\par
|
||||
}
|
||||
\makeatother
|
||||
|
||||
|
||||
|
||||
@ -83,18 +136,71 @@ $\odot$}}
|
||||
}
|
||||
|
||||
|
||||
\section{Rules}
|
||||
|
||||
This handout contains a set of problems. \par
|
||||
Each is marked with a few gold stars, which you collect by presenting a solution.
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
Below each problem is a list of hints, written next to their cost. \par
|
||||
To get a hint, you must pay the marked number of stars. \par
|
||||
Hints are usually provided in order, and are the same for all groups. \par
|
||||
|
||||
\vspace{2mm}
|
||||
|
||||
There is one exception: instructors may offer certain hints for a reduced fee,
|
||||
judging by your explanation of what you have so far.
|
||||
|
||||
\begin{instructornote}
|
||||
This exception is for groups that are stuck on the last bit of a problem. \par
|
||||
If they've solved most of it, give them the information they already know
|
||||
for a steep discount (or even for free).
|
||||
\end{instructornote}
|
||||
|
||||
|
||||
|
||||
An example problem is below.
|
||||
|
||||
\vspace{4mm}
|
||||
|
||||
\generic{Problem $0$:}
|
||||
\starvalue{4}
|
||||
|
||||
This is a problem that's worth four points. \par
|
||||
Two hints are available. The first costs two stars (of the four available). \par
|
||||
The second costs one of the two stars available \textit{after} revealing the first hint.
|
||||
|
||||
\begin{hintlist}
|
||||
Hint 1:
|
||||
\hintcontent{2}{4}{This is a hint. Only instructors see this.}
|
||||
|
||||
Hint 2:
|
||||
\hintcontent{1}{2}{This is another hint.}
|
||||
\end{hintlist}
|
||||
|
||||
\vfill
|
||||
|
||||
You may notice that hints often cost a significant fraction of their problem's score. \par
|
||||
This is intentional---don't ask for hints unless you're very, very stuck.
|
||||
|
||||
|
||||
|
||||
|
||||
\vfill
|
||||
\pagebreak
|
||||
|
||||
\input{parts/intro}
|
||||
|
||||
|
||||
\section{Simple problems}
|
||||
\input{parts/easy}
|
||||
|
||||
|
||||
\section{Harder problems}
|
||||
\section{Slightly harder problems}
|
||||
\input{parts/medium}
|
||||
|
||||
\section{Very difficult problems}
|
||||
\input{parts/hard}
|
||||
%\section{Very difficult problems}
|
||||
%\input{parts/hard}
|
||||
|
||||
\chessboard \hfill \chessboard \par
|
||||
\chessboard \hfill \chessboard \par
|
||||
|
Reference in New Issue
Block a user