Convert "Wild Tic-Tac-Toe" to typst
This commit is contained in:
parent
2c45e8ec56
commit
e177eb0539
@ -1,66 +0,0 @@
|
|||||||
\documentclass[
|
|
||||||
solutions,
|
|
||||||
hidewarning,
|
|
||||||
singlenumbering,
|
|
||||||
nopagenumber
|
|
||||||
]{../../../lib/tex/ormc_handout}
|
|
||||||
\usepackage{../../../lib/tex/macros}
|
|
||||||
|
|
||||||
% x,y,scale,style
|
|
||||||
\def\ttt#1#2#3#4{
|
|
||||||
\draw[#4] (#1, #2+#3) -- (#1+#3+#3+#3, #2+#3);
|
|
||||||
\draw[#4] (#1, #2+#3+#3) -- (#1+#3+#3+#3, #2+#3+#3);
|
|
||||||
\draw[#4] (#1+#3, #2) -- (#1+#3, #2+#3+#3+#3);
|
|
||||||
\draw[#4] (#1+#3+#3, #2) -- (#1+#3+#3, #2+#3+#3+#3);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
\title{Warm-Up: Wild Tic-Tac-Toe}
|
|
||||||
\uptitler{\smallurl{}}
|
|
||||||
\subtitle{Prepared by Mark on \today.}
|
|
||||||
|
|
||||||
\begin{document}
|
|
||||||
|
|
||||||
\maketitle
|
|
||||||
|
|
||||||
|
|
||||||
\problem{}
|
|
||||||
In wild tic-tac-toe, players may place either an X or O on each move. The player that first completes a
|
|
||||||
row of any three symbols wins. Show that the first player always has a winning strategy.
|
|
||||||
|
|
||||||
\vfill
|
|
||||||
\begin{center}
|
|
||||||
\begin{tikzpicture}[scale=0.60]
|
|
||||||
\ttt{0}{0}{2}{line width=0.3mm}
|
|
||||||
\ttt{7}{0}{2}{line width=0.3mm}
|
|
||||||
\ttt{14}{0}{2}{line width=0.3mm}
|
|
||||||
|
|
||||||
\ttt{0}{7}{2}{line width=0.3mm}
|
|
||||||
\ttt{7}{7}{2}{line width=0.3mm}
|
|
||||||
\ttt{14}{7}{2}{line width=0.3mm}
|
|
||||||
\end{tikzpicture}
|
|
||||||
\end{center}
|
|
||||||
|
|
||||||
\vfill
|
|
||||||
|
|
||||||
\problem{}
|
|
||||||
Now, say the first player to complete a row loses. Who has a winning strategy now?
|
|
||||||
|
|
||||||
\vfill
|
|
||||||
\begin{center}
|
|
||||||
\begin{tikzpicture}[scale=0.60]
|
|
||||||
\ttt{0}{0}{2}{line width=0.3mm}
|
|
||||||
\ttt{7}{0}{2}{line width=0.3mm}
|
|
||||||
\ttt{14}{0}{2}{line width=0.3mm}
|
|
||||||
|
|
||||||
\ttt{0}{7}{2}{line width=0.3mm}
|
|
||||||
\ttt{7}{7}{2}{line width=0.3mm}
|
|
||||||
\ttt{14}{7}{2}{line width=0.3mm}
|
|
||||||
\end{tikzpicture}
|
|
||||||
\end{center}
|
|
||||||
|
|
||||||
|
|
||||||
\vfill
|
|
||||||
\pagebreak
|
|
||||||
|
|
||||||
\end{document}
|
|
47
src/Warm-Ups/Wild Tic-Tac-Toe/main.typ
Normal file
47
src/Warm-Ups/Wild Tic-Tac-Toe/main.typ
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#import "@local/handout:0.1.0": *
|
||||||
|
#import "@preview/cetz:0.3.1"
|
||||||
|
|
||||||
|
#show: handout.with(
|
||||||
|
title: [Warm-Up: Wild Tic-Tac-Toe],
|
||||||
|
by: "Mark",
|
||||||
|
)
|
||||||
|
|
||||||
|
#let ttt = align(
|
||||||
|
center,
|
||||||
|
cetz.canvas({
|
||||||
|
import cetz.draw: *
|
||||||
|
let s = 0.7 // scale
|
||||||
|
|
||||||
|
set-style(stroke: (thickness: 0.5mm * s))
|
||||||
|
line((-1 * s, 3 * s), (-1 * s, -3 * s))
|
||||||
|
line((1 * s, 3 * s), (1 * s, -3 * s))
|
||||||
|
line((3 * s, -1 * s), (-3 * s, -1 * s))
|
||||||
|
line((3 * s, 1 * s), (-3 * s, 1 * s))
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
#problem()
|
||||||
|
In wild tic-tac-toe, players may place either an X or O on each move. The player that first completes a
|
||||||
|
row of any three symbols wins. Show that the first player always has a winning strategy.
|
||||||
|
#v(4mm)
|
||||||
|
|
||||||
|
#table(
|
||||||
|
stroke: none,
|
||||||
|
align: center,
|
||||||
|
columns: (1fr, 1fr, 1fr),
|
||||||
|
ttt, ttt, ttt,
|
||||||
|
);
|
||||||
|
#v(1fr)
|
||||||
|
|
||||||
|
#problem()
|
||||||
|
Now, say the first player to complete a row loses. Who has a winning strategy now?
|
||||||
|
#v(4mm)
|
||||||
|
|
||||||
|
#table(
|
||||||
|
stroke: none,
|
||||||
|
align: center,
|
||||||
|
columns: (1fr, 1fr, 1fr),
|
||||||
|
ttt, ttt, ttt,
|
||||||
|
);
|
||||||
|
#v(1fr)
|
Loading…
x
Reference in New Issue
Block a user