WEBVTT
Kind: captions
Language: en

00:00:01.964 --> 00:00:02.550 align:start position:0%
 
[cough]

00:00:02.550 --> 00:00:02.560 align:start position:0%
[cough]
 

00:00:02.560 --> 00:00:03.990 align:start position:0%
[cough]
I<00:00:02.619><c> [clears throat]</c><00:00:02.879><c> tried</c><00:00:03.120><c> to</c><00:00:03.280><c> code</c><00:00:03.520><c> Tetris</c>

00:00:03.990 --> 00:00:04.000 align:start position:0%
I [clears throat] tried to code Tetris
 

00:00:04.000 --> 00:00:05.990 align:start position:0%
I [clears throat] tried to code Tetris
from<00:00:04.160><c> scratch</c><00:00:04.560><c> with</c><00:00:04.799><c> no</c><00:00:05.120><c> experience</c><00:00:05.680><c> and</c>

00:00:05.990 --> 00:00:06.000 align:start position:0%
from scratch with no experience and
 

00:00:06.000 --> 00:00:08.150 align:start position:0%
from scratch with no experience and
never<00:00:06.319><c> having</c><00:00:06.640><c> taken</c><00:00:06.960><c> a</c><00:00:07.200><c> single</c><00:00:07.440><c> coding</c><00:00:07.839><c> class</c>

00:00:08.150 --> 00:00:08.160 align:start position:0%
never having taken a single coding class
 

00:00:08.160 --> 00:00:10.070 align:start position:0%
never having taken a single coding class
in<00:00:08.400><c> my</c><00:00:08.639><c> life.</c><00:00:09.120><c> I</c><00:00:09.280><c> wanted</c><00:00:09.440><c> to</c><00:00:09.599><c> see</c><00:00:09.679><c> if</c><00:00:09.840><c> an</c>

00:00:10.070 --> 00:00:10.080 align:start position:0%
in my life. I wanted to see if an
 

00:00:10.080 --> 00:00:12.070 align:start position:0%
in my life. I wanted to see if an
absolute<00:00:10.559><c> beginner</c><00:00:10.960><c> of</c><00:00:11.120><c> a</c><00:00:11.280><c> programmer</c><00:00:11.840><c> could</c>

00:00:12.070 --> 00:00:12.080 align:start position:0%
absolute beginner of a programmer could
 

00:00:12.080 --> 00:00:14.070 align:start position:0%
absolute beginner of a programmer could
create<00:00:12.320><c> a</c><00:00:12.480><c> game</c><00:00:12.639><c> like</c><00:00:12.880><c> Tetris</c><00:00:13.360><c> from</c><00:00:13.599><c> scratch</c>

00:00:14.070 --> 00:00:14.080 align:start position:0%
create a game like Tetris from scratch
 

00:00:14.080 --> 00:00:16.790 align:start position:0%
create a game like Tetris from scratch
with<00:00:14.400><c> no</c><00:00:14.639><c> AI</c><00:00:15.120><c> and</c><00:00:15.360><c> no</c><00:00:15.599><c> vibe</c><00:00:16.000><c> coding.</c><00:00:16.400><c> 2</c><00:00:16.640><c> months</c>

00:00:16.790 --> 00:00:16.800 align:start position:0%
with no AI and no vibe coding. 2 months
 

00:00:16.800 --> 00:00:19.029 align:start position:0%
with no AI and no vibe coding. 2 months
ago,<00:00:17.119><c> I</c><00:00:17.359><c> had</c><00:00:17.520><c> never</c><00:00:17.760><c> even</c><00:00:18.080><c> typed</c><00:00:18.480><c> a</c><00:00:18.720><c> single</c>

00:00:19.029 --> 00:00:19.039 align:start position:0%
ago, I had never even typed a single
 

00:00:19.039 --> 00:00:21.029 align:start position:0%
ago, I had never even typed a single
line<00:00:19.279><c> of</c><00:00:19.439><c> code.</c><00:00:19.840><c> But</c><00:00:20.000><c> recently,</c><00:00:20.400><c> I</c><00:00:20.640><c> was</c><00:00:20.720><c> struck</c>

00:00:21.029 --> 00:00:21.039 align:start position:0%
line of code. But recently, I was struck
 

00:00:21.039 --> 00:00:22.790 align:start position:0%
line of code. But recently, I was struck
with<00:00:21.199><c> the</c><00:00:21.359><c> masculine</c><00:00:22.160><c> urge</c><00:00:22.270><c> [music]</c><00:00:22.400><c> to</c><00:00:22.640><c> learn</c>

00:00:22.790 --> 00:00:22.800 align:start position:0%
with the masculine urge [music] to learn
 

00:00:22.800 --> 00:00:24.950 align:start position:0%
with the masculine urge [music] to learn
how<00:00:22.960><c> to</c><00:00:23.119><c> write</c><00:00:23.359><c> Python</c><00:00:24.080><c> and</c><00:00:24.240><c> tried</c><00:00:24.480><c> to</c><00:00:24.640><c> build</c><00:00:24.720><c> a</c>

00:00:24.950 --> 00:00:24.960 align:start position:0%
how to write Python and tried to build a
 

00:00:24.960 --> 00:00:26.790 align:start position:0%
how to write Python and tried to build a
chess<00:00:25.199><c> game.</c><00:00:25.519><c> It</c><00:00:25.760><c> turned</c><00:00:26.000><c> out</c><00:00:26.080><c> to</c><00:00:26.240><c> be</c><00:00:26.320><c> a</c><00:00:26.480><c> bug</c>

00:00:26.790 --> 00:00:26.800 align:start position:0%
chess game. It turned out to be a bug
 

00:00:26.800 --> 00:00:28.390 align:start position:0%
chess game. It turned out to be a bug
riddled<00:00:27.119><c> nightmare</c><00:00:27.599><c> held</c><00:00:27.920><c> together</c><00:00:28.160><c> by</c>

00:00:28.390 --> 00:00:28.400 align:start position:0%
riddled nightmare held together by
 

00:00:28.400 --> 00:00:30.070 align:start position:0%
riddled nightmare held together by
thousands<00:00:28.800><c> of</c><00:00:28.960><c> if</c><00:00:29.199><c> statements.</c><00:00:29.760><c> And</c><00:00:29.920><c> the</c>

00:00:30.070 --> 00:00:30.080 align:start position:0%
thousands of if statements. And the
 

00:00:30.080 --> 00:00:31.509 align:start position:0%
thousands of if statements. And the
internet<00:00:30.480><c> rightfully</c><00:00:30.960><c> labeled</c><00:00:31.279><c> that</c>

00:00:31.509 --> 00:00:31.519 align:start position:0%
internet rightfully labeled that
 

00:00:31.519 --> 00:00:33.910 align:start position:0%
internet rightfully labeled that
codebase<00:00:32.079><c> as</c><00:00:32.239><c> a</c><00:00:32.480><c> crime</c><00:00:32.719><c> against</c><00:00:33.040><c> humanity.</c><00:00:33.680><c> So</c>

00:00:33.910 --> 00:00:33.920 align:start position:0%
codebase as a crime against humanity. So
 

00:00:33.920 --> 00:00:35.750 align:start position:0%
codebase as a crime against humanity. So
for<00:00:34.079><c> this</c><00:00:34.320><c> project,</c><00:00:34.719><c> I</c><00:00:34.960><c> wanted</c><00:00:35.120><c> to</c><00:00:35.280><c> prove</c><00:00:35.520><c> the</c>

00:00:35.750 --> 00:00:35.760 align:start position:0%
for this project, I wanted to prove the
 

00:00:35.760 --> 00:00:37.590 align:start position:0%
for this project, I wanted to prove the
comments<00:00:36.160><c> wrong</c><00:00:36.399><c> and</c><00:00:36.719><c> show</c><00:00:36.880><c> them</c><00:00:37.120><c> that</c><00:00:37.360><c> I'm</c>

00:00:37.590 --> 00:00:37.600 align:start position:0%
comments wrong and show them that I'm
 

00:00:37.600 --> 00:00:40.709 align:start position:0%
comments wrong and show them that I'm
capable<00:00:37.840><c> of</c><00:00:38.079><c> writing</c><00:00:38.559><c> clean</c><00:00:38.960><c> code.</c><00:00:40.399><c> To</c><00:00:40.640><c> get</c>

00:00:40.709 --> 00:00:40.719 align:start position:0%
capable of writing clean code. To get
 

00:00:40.719 --> 00:00:42.229 align:start position:0%
capable of writing clean code. To get
this<00:00:40.960><c> project</c><00:00:41.200><c> out</c><00:00:41.360><c> the</c><00:00:41.520><c> door,</c><00:00:41.760><c> I'd</c><00:00:42.000><c> have</c><00:00:42.079><c> to</c>

00:00:42.229 --> 00:00:42.239 align:start position:0%
this project out the door, I'd have to
 

00:00:42.239 --> 00:00:44.229 align:start position:0%
this project out the door, I'd have to
survive<00:00:42.559><c> what</c><00:00:42.800><c> I'm</c><00:00:43.040><c> calling</c><00:00:43.520><c> the</c><00:00:43.760><c> Tetris</c>

00:00:44.229 --> 00:00:44.239 align:start position:0%
survive what I'm calling the Tetris
 

00:00:44.239 --> 00:00:45.910 align:start position:0%
survive what I'm calling the Tetris
Gauntlet,<00:00:44.719><c> where</c><00:00:44.960><c> I'd</c><00:00:45.200><c> have</c><00:00:45.360><c> to</c><00:00:45.440><c> face</c><00:00:45.680><c> a</c>

00:00:45.910 --> 00:00:45.920 align:start position:0%
Gauntlet, where I'd have to face a
 

00:00:45.920 --> 00:00:47.830 align:start position:0%
Gauntlet, where I'd have to face a
series<00:00:46.079><c> of</c><00:00:46.320><c> coding</c><00:00:46.640><c> problems</c><00:00:47.039><c> that</c><00:00:47.360><c> only</c><00:00:47.600><c> got</c>

00:00:47.830 --> 00:00:47.840 align:start position:0%
series of coding problems that only got
 

00:00:47.840 --> 00:00:49.990 align:start position:0%
series of coding problems that only got
harder<00:00:48.160><c> to</c><00:00:48.320><c> solve</c><00:00:48.559><c> as</c><00:00:48.800><c> I</c><00:00:49.039><c> added</c><00:00:49.360><c> features</c><00:00:49.760><c> and</c>

00:00:49.990 --> 00:00:50.000 align:start position:0%
harder to solve as I added features and
 

00:00:50.000 --> 00:00:52.310 align:start position:0%
harder to solve as I added features and
my<00:00:50.239><c> code</c><00:00:50.480><c> base</c><00:00:50.960><c> grew.</c><00:00:51.600><c> Let</c><00:00:51.760><c> me</c><00:00:51.920><c> tell</c><00:00:52.000><c> you,</c>

00:00:52.310 --> 00:00:52.320 align:start position:0%
my code base grew. Let me tell you,
 

00:00:52.320 --> 00:00:54.389 align:start position:0%
my code base grew. Let me tell you,
trying<00:00:52.559><c> to</c><00:00:52.719><c> solve</c><00:00:53.039><c> peace</c><00:00:53.360><c> rotations</c><00:00:54.079><c> was</c>

00:00:54.389 --> 00:00:54.399 align:start position:0%
trying to solve peace rotations was
 

00:00:54.399 --> 00:00:56.470 align:start position:0%
trying to solve peace rotations was
brutal.<00:00:54.879><c> To</c><00:00:55.120><c> get</c><00:00:55.280><c> started,</c><00:00:55.680><c> I</c><00:00:55.920><c> needed</c><00:00:56.079><c> a</c><00:00:56.239><c> tool</c>

00:00:56.470 --> 00:00:56.480 align:start position:0%
brutal. To get started, I needed a tool
 

00:00:56.480 --> 00:00:58.389 align:start position:0%
brutal. To get started, I needed a tool
that<00:00:56.719><c> would</c><00:00:56.960><c> actually</c><00:00:57.280><c> let</c><00:00:57.600><c> me</c><00:00:57.760><c> draw</c><00:00:58.079><c> shapes</c>

00:00:58.389 --> 00:00:58.399 align:start position:0%
that would actually let me draw shapes
 

00:00:58.399 --> 00:00:59.750 align:start position:0%
that would actually let me draw shapes
on<00:00:58.559><c> the</c><00:00:58.719><c> screen.</c><00:00:59.039><c> The</c><00:00:59.280><c> overwhelming</c>

00:00:59.750 --> 00:00:59.760 align:start position:0%
on the screen. The overwhelming
 

00:00:59.760 --> 00:01:01.349 align:start position:0%
on the screen. The overwhelming
recommendation<00:01:00.320><c> from</c><00:01:00.480><c> the</c><00:01:00.719><c> comments</c><00:01:01.039><c> was</c><00:01:01.199><c> a</c>

00:01:01.349 --> 00:01:01.359 align:start position:0%
recommendation from the comments was a
 

00:01:01.359 --> 00:01:03.750 align:start position:0%
recommendation from the comments was a
Python<00:01:01.760><c> library</c><00:01:02.320><c> called</c><00:01:02.719><c> Pygame.</c><00:01:03.359><c> My</c><00:01:03.600><c> first</c>

00:01:03.750 --> 00:01:03.760 align:start position:0%
Python library called Pygame. My first
 

00:01:03.760 --> 00:01:06.070 align:start position:0%
Python library called Pygame. My first
victory<00:01:04.239><c> wasn't</c><00:01:04.879><c> solving</c><00:01:05.280><c> some</c><00:01:05.600><c> complex</c>

00:01:06.070 --> 00:01:06.080 align:start position:0%
victory wasn't solving some complex
 

00:01:06.080 --> 00:01:07.990 align:start position:0%
victory wasn't solving some complex
algorithm.<00:01:06.799><c> It</c><00:01:06.960><c> was</c><00:01:07.119><c> just</c><00:01:07.280><c> writing</c><00:01:07.520><c> the</c><00:01:07.760><c> five</c>

00:01:07.990 --> 00:01:08.000 align:start position:0%
algorithm. It was just writing the five
 

00:01:08.000 --> 00:01:10.070 align:start position:0%
algorithm. It was just writing the five
lines<00:01:08.320><c> of</c><00:01:08.479><c> code</c><00:01:08.720><c> necessary</c><00:01:09.280><c> to</c><00:01:09.520><c> make</c><00:01:09.600><c> a</c><00:01:09.840><c> window</c>

00:01:10.070 --> 00:01:10.080 align:start position:0%
lines of code necessary to make a window
 

00:01:10.080 --> 00:01:12.070 align:start position:0%
lines of code necessary to make a window
pop<00:01:10.320><c> up</c><00:01:10.479><c> on</c><00:01:10.640><c> my</c><00:01:10.799><c> monitor</c><00:01:11.119><c> without</c><00:01:11.439><c> throwing</c><00:01:11.840><c> an</c>

00:01:12.070 --> 00:01:12.080 align:start position:0%
pop up on my monitor without throwing an
 

00:01:12.080 --> 00:01:13.670 align:start position:0%
pop up on my monitor without throwing an
error.<00:01:12.400><c> After</c><00:01:12.720><c> watching</c><00:01:12.960><c> some</c><00:01:13.280><c> excellent</c>

00:01:13.670 --> 00:01:13.680 align:start position:0%
error. After watching some excellent
 

00:01:13.680 --> 00:01:15.750 align:start position:0%
error. After watching some excellent
Pygame<00:01:14.240><c> tutorials,</c><00:01:14.799><c> I</c><00:01:14.960><c> messed</c><00:01:15.280><c> around</c><00:01:15.520><c> with</c>

00:01:15.750 --> 00:01:15.760 align:start position:0%
Pygame tutorials, I messed around with
 

00:01:15.760 --> 00:01:17.590 align:start position:0%
Pygame tutorials, I messed around with
making<00:01:16.080><c> simple</c><00:01:16.400><c> blocks</c><00:01:16.799><c> fall</c><00:01:17.119><c> and</c><00:01:17.360><c> using</c>

00:01:17.590 --> 00:01:17.600 align:start position:0%
making simple blocks fall and using
 

00:01:17.600 --> 00:01:19.910 align:start position:0%
making simple blocks fall and using
hitboxes<00:01:18.240><c> to</c><00:01:18.560><c> detect</c><00:01:18.960><c> collisions.</c><00:01:19.680><c> But</c><00:01:19.759><c> I</c>

00:01:19.910 --> 00:01:19.920 align:start position:0%
hitboxes to detect collisions. But I
 

00:01:19.920 --> 00:01:21.990 align:start position:0%
hitboxes to detect collisions. But I
quickly<00:01:20.240><c> realized</c><00:01:20.799><c> I</c><00:01:21.040><c> needed</c><00:01:21.200><c> a</c><00:01:21.439><c> concrete</c><00:01:21.840><c> way</c>

00:01:21.990 --> 00:01:22.000 align:start position:0%
quickly realized I needed a concrete way
 

00:01:22.000 --> 00:01:23.990 align:start position:0%
quickly realized I needed a concrete way
to<00:01:22.240><c> represent</c><00:01:22.560><c> the</c><00:01:22.799><c> permanent</c><00:01:23.200><c> blocks.</c><00:01:23.759><c> My</c>

00:01:23.990 --> 00:01:24.000 align:start position:0%
to represent the permanent blocks. My
 

00:01:24.000 --> 00:01:26.390 align:start position:0%
to represent the permanent blocks. My
solution<00:01:24.479><c> was</c><00:01:24.880><c> the</c><00:01:25.200><c> block</c><00:01:25.520><c> matrix.</c><00:01:26.240><c> I</c>

00:01:26.390 --> 00:01:26.400 align:start position:0%
solution was the block matrix. I
 

00:01:26.400 --> 00:01:28.630 align:start position:0%
solution was the block matrix. I
stumbled<00:01:26.720><c> upon</c><00:01:26.960><c> a</c><00:01:27.200><c> library</c><00:01:27.520><c> called</c><00:01:27.759><c> Numpy,</c>

00:01:28.630 --> 00:01:28.640 align:start position:0%
stumbled upon a library called Numpy,
 

00:01:28.640 --> 00:01:30.630 align:start position:0%
stumbled upon a library called Numpy,
which<00:01:28.960><c> allows</c><00:01:29.280><c> me</c><00:01:29.439><c> to</c><00:01:29.600><c> create</c><00:01:29.840><c> a</c><00:01:30.000><c> 2D</c><00:01:30.400><c> array,</c>

00:01:30.630 --> 00:01:30.640 align:start position:0%
which allows me to create a 2D array,
 

00:01:30.640 --> 00:01:32.069 align:start position:0%
which allows me to create a 2D array,
which<00:01:30.880><c> is</c><00:01:31.040><c> basically</c><00:01:31.280><c> just</c><00:01:31.439><c> a</c><00:01:31.680><c> table</c><00:01:31.840><c> that</c>

00:01:32.069 --> 00:01:32.079 align:start position:0%
which is basically just a table that
 

00:01:32.079 --> 00:01:33.749 align:start position:0%
which is basically just a table that
lives<00:01:32.400><c> inside</c><00:01:32.640><c> the</c><00:01:32.880><c> computer's</c><00:01:33.280><c> memory.</c><00:01:33.600><c> It</c>

00:01:33.749 --> 00:01:33.759 align:start position:0%
lives inside the computer's memory. It
 

00:01:33.759 --> 00:01:35.590 align:start position:0%
lives inside the computer's memory. It
has<00:01:34.079><c> rows</c><00:01:34.240><c> and</c><00:01:34.479><c> columns.</c><00:01:35.040><c> But</c><00:01:35.119><c> I</c><00:01:35.280><c> didn't</c><00:01:35.439><c> just</c>

00:01:35.590 --> 00:01:35.600 align:start position:0%
has rows and columns. But I didn't just
 

00:01:35.600 --> 00:01:37.670 align:start position:0%
has rows and columns. But I didn't just
want<00:01:35.759><c> to</c><00:01:36.000><c> hardcode</c><00:01:36.479><c> a</c><00:01:36.640><c> grid</c><00:01:36.960><c> and</c><00:01:37.200><c> hope</c><00:01:37.439><c> for</c><00:01:37.520><c> the</c>

00:01:37.670 --> 00:01:37.680 align:start position:0%
want to hardcode a grid and hope for the
 

00:01:37.680 --> 00:01:39.510 align:start position:0%
want to hardcode a grid and hope for the
best.<00:01:38.079><c> I</c><00:01:38.240><c> needed</c><00:01:38.479><c> a</c><00:01:38.720><c> system</c><00:01:39.040><c> that</c><00:01:39.280><c> could</c>

00:01:39.510 --> 00:01:39.520 align:start position:0%
best. I needed a system that could
 

00:01:39.520 --> 00:01:41.190 align:start position:0%
best. I needed a system that could
calculate<00:01:39.920><c> the</c><00:01:40.159><c> size</c><00:01:40.320><c> of</c><00:01:40.400><c> the</c><00:01:40.640><c> blocks</c><00:01:40.960><c> based</c>

00:01:41.190 --> 00:01:41.200 align:start position:0%
calculate the size of the blocks based
 

00:01:41.200 --> 00:01:42.789 align:start position:0%
calculate the size of the blocks based
on<00:01:41.360><c> how</c><00:01:41.520><c> big</c><00:01:41.680><c> the</c><00:01:41.840><c> window</c><00:01:42.079><c> was.</c><00:01:42.320><c> I</c><00:01:42.479><c> wrote</c><00:01:42.640><c> a</c>

00:01:42.789 --> 00:01:42.799 align:start position:0%
on how big the window was. I wrote a
 

00:01:42.799 --> 00:01:44.390 align:start position:0%
on how big the window was. I wrote a
simple<00:01:43.119><c> equation</c><00:01:43.439><c> that</c><00:01:43.680><c> takes</c><00:01:43.920><c> the</c><00:01:44.079><c> window</c>

00:01:44.390 --> 00:01:44.400 align:start position:0%
simple equation that takes the window
 

00:01:44.400 --> 00:01:45.910 align:start position:0%
simple equation that takes the window
width<00:01:44.720><c> and</c><00:01:44.880><c> divides</c><00:01:45.200><c> it</c><00:01:45.360><c> by</c><00:01:45.520><c> the</c><00:01:45.680><c> number</c><00:01:45.759><c> of</c>

00:01:45.910 --> 00:01:45.920 align:start position:0%
width and divides it by the number of
 

00:01:45.920 --> 00:01:47.990 align:start position:0%
width and divides it by the number of
columns<00:01:46.320><c> I</c><00:01:46.479><c> want.</c><00:01:46.880><c> This</c><00:01:47.040><c> created</c><00:01:47.360><c> a</c><00:01:47.600><c> dynamic</c>

00:01:47.990 --> 00:01:48.000 align:start position:0%
columns I want. This created a dynamic
 

00:01:48.000 --> 00:01:49.350 align:start position:0%
columns I want. This created a dynamic
system<00:01:48.240><c> that</c><00:01:48.399><c> allowed</c><00:01:48.640><c> me</c><00:01:48.799><c> to</c><00:01:48.960><c> change</c><00:01:49.119><c> my</c>

00:01:49.350 --> 00:01:49.360 align:start position:0%
system that allowed me to change my
 

00:01:49.360 --> 00:01:51.270 align:start position:0%
system that allowed me to change my
number<00:01:49.520><c> of</c><00:01:49.680><c> columns</c><00:01:50.079><c> and</c><00:01:50.560><c> rows</c><00:01:50.799><c> whenever</c><00:01:51.119><c> I</c>

00:01:51.270 --> 00:01:51.280 align:start position:0%
number of columns and rows whenever I
 

00:01:51.280 --> 00:01:54.149 align:start position:0%
number of columns and rows whenever I
want.<00:01:51.520><c> I</c><00:01:51.759><c> could</c><00:01:51.920><c> have</c><00:01:52.079><c> 18,</c><00:01:52.640><c> 22,</c><00:01:53.280><c> 50,</c><00:01:53.680><c> or</c><00:01:53.920><c> more</c>

00:01:54.149 --> 00:01:54.159 align:start position:0%
want. I could have 18, 22, 50, or more
 

00:01:54.159 --> 00:01:55.910 align:start position:0%
want. I could have 18, 22, 50, or more
columns,<00:01:54.640><c> and</c><00:01:54.880><c> the</c><00:01:55.040><c> entire</c><00:01:55.360><c> game,</c><00:01:55.680><c> the</c>

00:01:55.910 --> 00:01:55.920 align:start position:0%
columns, and the entire game, the
 

00:01:55.920 --> 00:01:57.429 align:start position:0%
columns, and the entire game, the
physics,<00:01:56.240><c> the</c><00:01:56.399><c> rendering,</c><00:01:56.799><c> the</c><00:01:56.960><c> logic</c><00:01:57.280><c> would</c>

00:01:57.429 --> 00:01:57.439 align:start position:0%
physics, the rendering, the logic would
 

00:01:57.439 --> 00:01:59.590 align:start position:0%
physics, the rendering, the logic would
rescale<00:01:58.399><c> uh</c><00:01:58.640><c> more</c><00:01:58.799><c> or</c><00:01:58.960><c> less</c><00:01:59.200><c> almost</c>

00:01:59.590 --> 00:01:59.600 align:start position:0%
rescale uh more or less almost
 

00:01:59.600 --> 00:02:01.429 align:start position:0%
rescale uh more or less almost
perfectly.<00:02:00.320><c> Even</c><00:02:00.479><c> though</c><00:02:00.640><c> the</c><00:02:00.880><c> system</c><00:02:01.200><c> only</c>

00:02:01.429 --> 00:02:01.439 align:start position:0%
perfectly. Even though the system only
 

00:02:01.439 --> 00:02:03.590 align:start position:0%
perfectly. Even though the system only
required<00:02:01.920><c> third</c><00:02:02.240><c> grade</c><00:02:02.479><c> math</c><00:02:02.799><c> to</c><00:02:02.960><c> figure</c><00:02:03.200><c> out,</c>

00:02:03.590 --> 00:02:03.600 align:start position:0%
required third grade math to figure out,
 

00:02:03.600 --> 00:02:05.670 align:start position:0%
required third grade math to figure out,
I<00:02:03.840><c> was</c><00:02:04.079><c> incredibly</c><00:02:04.719><c> proud</c><00:02:04.880><c> of</c><00:02:05.040><c> my</c><00:02:05.200><c> creation.</c>

00:02:05.670 --> 00:02:05.680 align:start position:0%
I was incredibly proud of my creation.
 

00:02:05.680 --> 00:02:07.429 align:start position:0%
I was incredibly proud of my creation.
After<00:02:05.840><c> I</c><00:02:06.000><c> got</c><00:02:06.079><c> the</c><00:02:06.320><c> block</c><00:02:06.479><c> matrix</c><00:02:06.880><c> set</c><00:02:07.040><c> up,</c><00:02:07.200><c> I</c>

00:02:07.429 --> 00:02:07.439 align:start position:0%
After I got the block matrix set up, I
 

00:02:07.439 --> 00:02:09.029 align:start position:0%
After I got the block matrix set up, I
tried<00:02:07.680><c> doing</c><00:02:07.840><c> things</c><00:02:08.080><c> the</c><00:02:08.319><c> easy</c><00:02:08.479><c> way.</c><00:02:08.720><c> My</c><00:02:08.879><c> plan</c>

00:02:09.029 --> 00:02:09.039 align:start position:0%
tried doing things the easy way. My plan
 

00:02:09.039 --> 00:02:10.710 align:start position:0%
tried doing things the easy way. My plan
was<00:02:09.200><c> simple.</c><00:02:09.440><c> I'd</c><00:02:09.679><c> make</c><00:02:09.759><c> a</c><00:02:09.920><c> square,</c><00:02:10.319><c> give</c><00:02:10.479><c> it</c><00:02:10.560><c> a</c>

00:02:10.710 --> 00:02:10.720 align:start position:0%
was simple. I'd make a square, give it a
 

00:02:10.720 --> 00:02:12.630 align:start position:0%
was simple. I'd make a square, give it a
hitbox,<00:02:11.200><c> and</c><00:02:11.360><c> if</c><00:02:11.440><c> that</c><00:02:11.599><c> hitbox</c><00:02:12.080><c> touches</c><00:02:12.400><c> the</c>

00:02:12.630 --> 00:02:12.640 align:start position:0%
hitbox, and if that hitbox touches the
 

00:02:12.640 --> 00:02:14.470 align:start position:0%
hitbox, and if that hitbox touches the
ground<00:02:12.879><c> or</c><00:02:13.120><c> another</c><00:02:13.520><c> square,</c><00:02:13.920><c> the</c><00:02:14.160><c> game</c><00:02:14.319><c> would</c>

00:02:14.470 --> 00:02:14.480 align:start position:0%
ground or another square, the game would
 

00:02:14.480 --> 00:02:16.390 align:start position:0%
ground or another square, the game would
stop<00:02:14.720><c> it</c><00:02:14.879><c> from</c><00:02:15.040><c> moving.</c><00:02:15.520><c> This</c><00:02:15.760><c> method</c><00:02:16.000><c> was</c><00:02:16.239><c> a</c>

00:02:16.390 --> 00:02:16.400 align:start position:0%
stop it from moving. This method was a
 

00:02:16.400 --> 00:02:18.150 align:start position:0%
stop it from moving. This method was a
total<00:02:16.720><c> failure</c><00:02:17.120><c> and</c><00:02:17.360><c> it</c><00:02:17.440><c> took</c><00:02:17.680><c> me</c><00:02:17.840><c> nearly</c>

00:02:18.150 --> 00:02:18.160 align:start position:0%
total failure and it took me nearly
 

00:02:18.160 --> 00:02:19.750 align:start position:0%
total failure and it took me nearly
three<00:02:18.400><c> days</c><00:02:18.560><c> to</c><00:02:18.800><c> reach</c><00:02:19.040><c> that</c><00:02:19.200><c> conclusion</c>

00:02:19.750 --> 00:02:19.760 align:start position:0%
three days to reach that conclusion
 

00:02:19.760 --> 00:02:21.510 align:start position:0%
three days to reach that conclusion
because<00:02:20.000><c> I</c><00:02:20.239><c> was</c><00:02:20.319><c> trying</c><00:02:20.480><c> to</c><00:02:20.560><c> mix</c><00:02:20.879><c> Pygame</c>

00:02:21.510 --> 00:02:21.520 align:start position:0%
because I was trying to mix Pygame
 

00:02:21.520 --> 00:02:24.070 align:start position:0%
because I was trying to mix Pygame
physics<00:02:22.080><c> with</c><00:02:22.239><c> a</c><00:02:22.400><c> numpy</c><00:02:22.959><c> matrix</c><00:02:23.520><c> and</c><00:02:23.760><c> the</c><00:02:23.920><c> two</c>

00:02:24.070 --> 00:02:24.080 align:start position:0%
physics with a numpy matrix and the two
 

00:02:24.080 --> 00:02:25.830 align:start position:0%
physics with a numpy matrix and the two
systems<00:02:24.480><c> were</c><00:02:24.720><c> constantly</c><00:02:25.200><c> fighting.</c><00:02:25.599><c> My</c>

00:02:25.830 --> 00:02:25.840 align:start position:0%
systems were constantly fighting. My
 

00:02:25.840 --> 00:02:27.270 align:start position:0%
systems were constantly fighting. My
pieces<00:02:26.080><c> would</c><00:02:26.239><c> get</c><00:02:26.400><c> stuck</c><00:02:26.560><c> in</c><00:02:26.800><c> walls,</c><00:02:27.120><c> they</c>

00:02:27.270 --> 00:02:27.280 align:start position:0%
pieces would get stuck in walls, they
 

00:02:27.280 --> 00:02:28.630 align:start position:0%
pieces would get stuck in walls, they
would<00:02:27.360><c> overlap</c><00:02:27.840><c> each</c><00:02:28.000><c> other</c><00:02:28.160><c> or</c><00:02:28.319><c> they</c><00:02:28.480><c> would</c>

00:02:28.630 --> 00:02:28.640 align:start position:0%
would overlap each other or they would
 

00:02:28.640 --> 00:02:30.070 align:start position:0%
would overlap each other or they would
simply<00:02:28.879><c> fall</c><00:02:29.120><c> through</c><00:02:29.280><c> the</c><00:02:29.520><c> floor</c><00:02:29.840><c> because</c>

00:02:30.070 --> 00:02:30.080 align:start position:0%
simply fall through the floor because
 

00:02:30.080 --> 00:02:31.589 align:start position:0%
simply fall through the floor because
the<00:02:30.239><c> frame</c><00:02:30.480><c> rate</c><00:02:30.720><c> didn't</c><00:02:30.959><c> sync</c><00:02:31.200><c> up</c><00:02:31.280><c> with</c><00:02:31.440><c> the</c>

00:02:31.589 --> 00:02:31.599 align:start position:0%
the frame rate didn't sync up with the
 

00:02:31.599 --> 00:02:33.589 align:start position:0%
the frame rate didn't sync up with the
collision<00:02:32.000><c> checks.</c><00:02:32.480><c> I</c><00:02:32.640><c> spent</c><00:02:32.959><c> days</c><00:02:33.360><c> dealing</c>

00:02:33.589 --> 00:02:33.599 align:start position:0%
collision checks. I spent days dealing
 

00:02:33.599 --> 00:02:35.030 align:start position:0%
collision checks. I spent days dealing
with<00:02:33.760><c> bugs</c><00:02:34.000><c> that</c><00:02:34.160><c> I</c><00:02:34.319><c> couldn't</c><00:02:34.480><c> explain</c><00:02:34.800><c> until</c>

00:02:35.030 --> 00:02:35.040 align:start position:0%
with bugs that I couldn't explain until
 

00:02:35.040 --> 00:02:36.309 align:start position:0%
with bugs that I couldn't explain until
I<00:02:35.200><c> realized</c><00:02:35.440><c> that</c><00:02:35.599><c> I</c><00:02:35.760><c> just</c><00:02:35.920><c> have</c><00:02:36.000><c> to</c><00:02:36.160><c> start</c>

00:02:36.309 --> 00:02:36.319 align:start position:0%
I realized that I just have to start
 

00:02:36.319 --> 00:02:38.070 align:start position:0%
I realized that I just have to start
over.<00:02:36.720><c> Getting</c><00:02:36.959><c> back</c><00:02:37.120><c> on</c><00:02:37.280><c> my</c><00:02:37.360><c> feet,</c><00:02:37.680><c> I</c><00:02:37.840><c> decided</c>

00:02:38.070 --> 00:02:38.080 align:start position:0%
over. Getting back on my feet, I decided
 

00:02:38.080 --> 00:02:39.670 align:start position:0%
over. Getting back on my feet, I decided
that<00:02:38.319><c> the</c><00:02:38.480><c> block</c><00:02:38.800><c> matrix</c><00:02:39.200><c> would</c><00:02:39.360><c> be</c><00:02:39.519><c> the</c>

00:02:39.670 --> 00:02:39.680 align:start position:0%
that the block matrix would be the
 

00:02:39.680 --> 00:02:41.509 align:start position:0%
that the block matrix would be the
single<00:02:39.920><c> source</c><00:02:40.160><c> of</c><00:02:40.319><c> truth.</c><00:02:40.720><c> Pygame</c><00:02:41.200><c> would</c><00:02:41.360><c> no</c>

00:02:41.509 --> 00:02:41.519 align:start position:0%
single source of truth. Pygame would no
 

00:02:41.519 --> 00:02:43.190 align:start position:0%
single source of truth. Pygame would no
longer<00:02:41.840><c> be</c><00:02:42.000><c> responsible</c><00:02:42.400><c> for</c><00:02:42.560><c> the</c><00:02:42.720><c> physics.</c>

00:02:43.190 --> 00:02:43.200 align:start position:0%
longer be responsible for the physics.
 

00:02:43.200 --> 00:02:44.869 align:start position:0%
longer be responsible for the physics.
it<00:02:43.360><c> would</c><00:02:43.519><c> only</c><00:02:43.760><c> be</c><00:02:43.920><c> responsible</c><00:02:44.319><c> for</c><00:02:44.560><c> drawing</c>

00:02:44.869 --> 00:02:44.879 align:start position:0%
it would only be responsible for drawing
 

00:02:44.879 --> 00:02:47.030 align:start position:0%
it would only be responsible for drawing
exactly<00:02:45.280><c> what</c><00:02:45.440><c> the</c><00:02:45.599><c> matrix</c><00:02:46.000><c> told</c><00:02:46.239><c> it</c><00:02:46.400><c> to.</c><00:02:46.800><c> This</c>

00:02:47.030 --> 00:02:47.040 align:start position:0%
exactly what the matrix told it to. This
 

00:02:47.040 --> 00:02:49.270 align:start position:0%
exactly what the matrix told it to. This
way,<00:02:47.360><c> I</c><00:02:47.680><c> can</c><00:02:47.840><c> control</c><00:02:48.239><c> game</c><00:02:48.560><c> rules</c><00:02:48.879><c> strictly</c>

00:02:49.270 --> 00:02:49.280 align:start position:0%
way, I can control game rules strictly
 

00:02:49.280 --> 00:02:50.790 align:start position:0%
way, I can control game rules strictly
through<00:02:49.519><c> my</c><00:02:49.760><c> own</c><00:02:49.920><c> logic</c><00:02:50.239><c> and</c><00:02:50.560><c> keep</c><00:02:50.640><c> the</c>

00:02:50.790 --> 00:02:50.800 align:start position:0%
through my own logic and keep the
 

00:02:50.800 --> 00:02:52.630 align:start position:0%
through my own logic and keep the
rendering<00:02:51.280><c> separate.</c><00:02:51.840><c> To</c><00:02:52.080><c> make</c><00:02:52.160><c> the</c><00:02:52.319><c> pieces</c>

00:02:52.630 --> 00:02:52.640 align:start position:0%
rendering separate. To make the pieces
 

00:02:52.640 --> 00:02:54.869 align:start position:0%
rendering separate. To make the pieces
move,<00:02:52.959><c> I</c><00:02:53.200><c> created</c><00:02:53.440><c> a</c><00:02:53.680><c> row</c><00:02:53.760><c> indexer,</c><00:02:54.400><c> a</c><00:02:54.560><c> column</c>

00:02:54.869 --> 00:02:54.879 align:start position:0%
move, I created a row indexer, a column
 

00:02:54.879 --> 00:02:56.949 align:start position:0%
move, I created a row indexer, a column
indexer,<00:02:55.360><c> and</c><00:02:55.519><c> a</c><00:02:55.680><c> drop</c><00:02:56.000><c> timer.</c><00:02:56.480><c> These</c><00:02:56.720><c> three</c>

00:02:56.949 --> 00:02:56.959 align:start position:0%
indexer, and a drop timer. These three
 

00:02:56.959 --> 00:02:59.110 align:start position:0%
indexer, and a drop timer. These three
variables<00:02:57.440><c> worked</c><00:02:57.760><c> together</c><00:02:58.080><c> like</c><00:02:58.319><c> a</c><00:02:58.480><c> GPS</c><00:02:58.959><c> for</c>

00:02:59.110 --> 00:02:59.120 align:start position:0%
variables worked together like a GPS for
 

00:02:59.120 --> 00:03:00.869 align:start position:0%
variables worked together like a GPS for
the<00:02:59.280><c> falling</c><00:02:59.599><c> block.</c><00:03:00.000><c> The</c><00:03:00.160><c> drop</c><00:03:00.480><c> timer</c>

00:03:00.869 --> 00:03:00.879 align:start position:0%
the falling block. The drop timer
 

00:03:00.879 --> 00:03:02.550 align:start position:0%
the falling block. The drop timer
handles<00:03:01.120><c> the</c><00:03:01.280><c> gravity.</c><00:03:01.760><c> I</c><00:03:01.920><c> set</c><00:03:02.080><c> it</c><00:03:02.159><c> up</c><00:03:02.319><c> to</c>

00:03:02.550 --> 00:03:02.560 align:start position:0%
handles the gravity. I set it up to
 

00:03:02.560 --> 00:03:04.309 align:start position:0%
handles the gravity. I set it up to
increase<00:03:02.879><c> every</c><00:03:03.200><c> frame</c><00:03:03.519><c> based</c><00:03:03.760><c> on</c><00:03:03.920><c> the</c><00:03:04.080><c> drop</c>

00:03:04.309 --> 00:03:04.319 align:start position:0%
increase every frame based on the drop
 

00:03:04.319 --> 00:03:06.149 align:start position:0%
increase every frame based on the drop
rate.<00:03:04.720><c> As</c><00:03:04.879><c> the</c><00:03:05.040><c> timer</c><00:03:05.360><c> climbs,</c><00:03:05.760><c> the</c><00:03:06.000><c> row</c>

00:03:06.149 --> 00:03:06.159 align:start position:0%
rate. As the timer climbs, the row
 

00:03:06.159 --> 00:03:07.910 align:start position:0%
rate. As the timer climbs, the row
indexer<00:03:06.640><c> converts</c><00:03:07.040><c> those</c><00:03:07.200><c> numbers</c><00:03:07.519><c> into</c><00:03:07.760><c> an</c>

00:03:07.910 --> 00:03:07.920 align:start position:0%
indexer converts those numbers into an
 

00:03:07.920 --> 00:03:09.750 align:start position:0%
indexer converts those numbers into an
integer<00:03:08.400><c> that</c><00:03:08.640><c> tells</c><00:03:08.800><c> the</c><00:03:09.040><c> computer</c><00:03:09.360><c> which</c>

00:03:09.750 --> 00:03:09.760 align:start position:0%
integer that tells the computer which
 

00:03:09.760 --> 00:03:11.509 align:start position:0%
integer that tells the computer which
row<00:03:09.840><c> the</c><00:03:10.080><c> piece</c><00:03:10.400><c> should</c><00:03:10.560><c> be</c><00:03:10.640><c> in.</c><00:03:10.959><c> Meanwhile,</c>

00:03:11.509 --> 00:03:11.519 align:start position:0%
row the piece should be in. Meanwhile,
 

00:03:11.519 --> 00:03:13.110 align:start position:0%
row the piece should be in. Meanwhile,
the<00:03:11.680><c> column</c><00:03:11.917><c> [music]</c><00:03:12.080><c> indexer</c><00:03:12.640><c> tracks</c><00:03:12.959><c> the</c>

00:03:13.110 --> 00:03:13.120 align:start position:0%
the column [music] indexer tracks the
 

00:03:13.120 --> 00:03:14.630 align:start position:0%
the column [music] indexer tracks the
horizontal<00:03:13.680><c> position.</c><00:03:14.159><c> When</c><00:03:14.319><c> the</c><00:03:14.480><c> player</c>

00:03:14.630 --> 00:03:14.640 align:start position:0%
horizontal position. When the player
 

00:03:14.640 --> 00:03:16.309 align:start position:0%
horizontal position. When the player
hits<00:03:14.879><c> left</c><00:03:15.040><c> or</c><00:03:15.200><c> right</c><00:03:15.360><c> on</c><00:03:15.519><c> the</c><00:03:15.599><c> arrow</c><00:03:15.920><c> key,</c><00:03:16.159><c> the</c>

00:03:16.309 --> 00:03:16.319 align:start position:0%
hits left or right on the arrow key, the
 

00:03:16.319 --> 00:03:18.309 align:start position:0%
hits left or right on the arrow key, the
code<00:03:16.560><c> simply</c><00:03:16.879><c> increases</c><00:03:17.360><c> or</c><00:03:17.680><c> decreases</c><00:03:18.159><c> that</c>

00:03:18.309 --> 00:03:18.319 align:start position:0%
code simply increases or decreases that
 

00:03:18.319 --> 00:03:20.470 align:start position:0%
code simply increases or decreases that
indexer.<00:03:19.040><c> Every</c><00:03:19.280><c> time</c><00:03:19.360><c> the</c><00:03:19.760><c> row</c><00:03:19.920><c> indexer</c>

00:03:20.470 --> 00:03:20.480 align:start position:0%
indexer. Every time the row indexer
 

00:03:20.480 --> 00:03:22.790 align:start position:0%
indexer. Every time the row indexer
updates,<00:03:20.959><c> the</c><00:03:21.120><c> code</c><00:03:21.360><c> performs</c><00:03:21.680><c> a</c><00:03:22.000><c> move.</c><00:03:22.560><c> We</c>

00:03:22.790 --> 00:03:22.800 align:start position:0%
updates, the code performs a move. We
 

00:03:22.800 --> 00:03:24.390 align:start position:0%
updates, the code performs a move. We
place<00:03:23.040><c> the</c><00:03:23.280><c> value</c><00:03:23.680><c> one</c><00:03:23.920><c> in</c><00:03:24.080><c> the</c><00:03:24.239><c> new</c>

00:03:24.390 --> 00:03:24.400 align:start position:0%
place the value one in the new
 

00:03:24.400 --> 00:03:26.070 align:start position:0%
place the value one in the new
coordinate,<00:03:24.959><c> which</c><00:03:25.200><c> is</c><00:03:25.280><c> the</c><00:03:25.519><c> intersection</c><00:03:25.920><c> of</c>

00:03:26.070 --> 00:03:26.080 align:start position:0%
coordinate, which is the intersection of
 

00:03:26.080 --> 00:03:28.390 align:start position:0%
coordinate, which is the intersection of
our<00:03:26.480><c> row</c><00:03:26.560><c> and</c><00:03:26.800><c> column</c><00:03:27.120><c> indexers.</c><00:03:27.840><c> And</c><00:03:28.000><c> then,</c>

00:03:28.390 --> 00:03:28.400 align:start position:0%
our row and column indexers. And then,
 

00:03:28.400 --> 00:03:30.247 align:start position:0%
our row and column indexers. And then,
crucially,<00:03:29.040><c> we</c><00:03:29.200><c> wipe</c><00:03:29.519><c> out</c><00:03:29.680><c> the</c><00:03:29.840><c> one</c><00:03:30.080><c> from</c>

00:03:30.247 --> 00:03:30.257 align:start position:0%
crucially, we wipe out the one from
 

00:03:30.257 --> 00:03:31.509 align:start position:0%
crucially, we wipe out the one from
[music]<00:03:30.319><c> the</c><00:03:30.480><c> previous</c><00:03:30.799><c> position.</c><00:03:31.280><c> If</c><00:03:31.440><c> you</c>

00:03:31.509 --> 00:03:31.519 align:start position:0%
[music] the previous position. If you
 

00:03:31.519 --> 00:03:33.270 align:start position:0%
[music] the previous position. If you
forget<00:03:31.760><c> that</c><00:03:32.000><c> last</c><00:03:32.159><c> step,</c><00:03:32.480><c> your</c><00:03:32.720><c> piece</c><00:03:33.040><c> leaves</c>

00:03:33.270 --> 00:03:33.280 align:start position:0%
forget that last step, your piece leaves
 

00:03:33.280 --> 00:03:34.949 align:start position:0%
forget that last step, your piece leaves
a<00:03:33.440><c> permanent</c><00:03:33.840><c> trail</c><00:03:34.000><c> of</c><00:03:34.159><c> blocks</c><00:03:34.480><c> behind</c><00:03:34.720><c> it.</c>

00:03:34.949 --> 00:03:34.959 align:start position:0%
a permanent trail of blocks behind it.
 

00:03:34.959 --> 00:03:36.869 align:start position:0%
a permanent trail of blocks behind it.
But<00:03:35.120><c> look</c><00:03:35.280><c> at</c><00:03:35.360><c> this.</c><00:03:35.760><c> I'm</c><00:03:36.080><c> successfully</c>

00:03:36.869 --> 00:03:36.879 align:start position:0%
But look at this. I'm successfully
 

00:03:36.879 --> 00:03:38.789 align:start position:0%
But look at this. I'm successfully
representing<00:03:37.360><c> a</c><00:03:37.680><c> falling</c><00:03:38.080><c> block</c><00:03:38.319><c> in</c><00:03:38.560><c> my</c>

00:03:38.789 --> 00:03:38.799 align:start position:0%
representing a falling block in my
 

00:03:38.799 --> 00:03:42.149 align:start position:0%
representing a falling block in my
matrix.<00:03:40.159><c> Woohoo!</c><00:03:41.200><c> Once</c><00:03:41.519><c> the</c><00:03:41.680><c> pieces</c><00:03:41.920><c> were</c>

00:03:42.149 --> 00:03:42.159 align:start position:0%
matrix. Woohoo! Once the pieces were
 

00:03:42.159 --> 00:03:44.229 align:start position:0%
matrix. Woohoo! Once the pieces were
falling,<00:03:42.560><c> I</c><00:03:42.720><c> had</c><00:03:42.879><c> to</c><00:03:42.959><c> make</c><00:03:43.120><c> them</c><00:03:43.519><c> stick.</c><00:03:44.080><c> I</c>

00:03:44.229 --> 00:03:44.239 align:start position:0%
falling, I had to make them stick. I
 

00:03:44.239 --> 00:03:46.630 align:start position:0%
falling, I had to make them stick. I
wrote<00:03:44.480><c> a</c><00:03:44.799><c> check.</c><00:03:45.120><c> If</c><00:03:45.519><c> row</c><00:03:45.599><c> indexer</c><00:03:46.159><c> plus</c><00:03:46.319><c> one,</c>

00:03:46.630 --> 00:03:46.640 align:start position:0%
wrote a check. If row indexer plus one,
 

00:03:46.640 --> 00:03:48.550 align:start position:0%
wrote a check. If row indexer plus one,
aka<00:03:47.120><c> the</c><00:03:47.280><c> space</c><00:03:47.519><c> directly</c><00:03:47.840><c> below</c><00:03:48.080><c> the</c><00:03:48.239><c> piece</c>

00:03:48.550 --> 00:03:48.560 align:start position:0%
aka the space directly below the piece
 

00:03:48.560 --> 00:03:50.869 align:start position:0%
aka the space directly below the piece
already<00:03:48.879><c> contains</c><00:03:49.200><c> a</c><00:03:49.360><c> two,</c><00:03:49.760><c> aka</c><00:03:50.319><c> a</c><00:03:50.480><c> permanent</c>

00:03:50.869 --> 00:03:50.879 align:start position:0%
already contains a two, aka a permanent
 

00:03:50.879 --> 00:03:52.070 align:start position:0%
already contains a two, aka a permanent
block,<00:03:51.120><c> then</c><00:03:51.280><c> the</c><00:03:51.440><c> current</c><00:03:51.680><c> piece's</c><00:03:51.872><c> [music]</c>

00:03:52.070 --> 00:03:52.080 align:start position:0%
block, then the current piece's [music]
 

00:03:52.080 --> 00:03:54.630 align:start position:0%
block, then the current piece's [music]
ones<00:03:52.560><c> are</c><00:03:52.799><c> instantly</c><00:03:53.280><c> converted</c><00:03:53.760><c> into</c><00:03:54.080><c> twos.</c>

00:03:54.630 --> 00:03:54.640 align:start position:0%
ones are instantly converted into twos.
 

00:03:54.640 --> 00:03:56.710 align:start position:0%
ones are instantly converted into twos.
The<00:03:54.879><c> piece</c><00:03:55.120><c> dies</c><00:03:55.840><c> and</c><00:03:56.000><c> it</c><00:03:56.239><c> becomes</c><00:03:56.480><c> part</c><00:03:56.640><c> of</c>

00:03:56.710 --> 00:03:56.720 align:start position:0%
The piece dies and it becomes part of
 

00:03:56.720 --> 00:03:58.550 align:start position:0%
The piece dies and it becomes part of
the<00:03:56.879><c> permanent</c><00:03:57.200><c> landscape</c><00:03:57.680><c> and</c><00:03:57.840><c> a</c><00:03:58.080><c> new</c><00:03:58.239><c> player</c>

00:03:58.550 --> 00:03:58.560 align:start position:0%
the permanent landscape and a new player
 

00:03:58.560 --> 00:04:00.710 align:start position:0%
the permanent landscape and a new player
piece<00:03:58.959><c> spawns</c><00:03:59.280><c> at</c><00:03:59.519><c> the</c><00:03:59.599><c> top.</c><00:04:00.000><c> Then</c><00:04:00.239><c> came</c><00:04:00.560><c> one</c>

00:04:00.710 --> 00:04:00.720 align:start position:0%
piece spawns at the top. Then came one
 

00:04:00.720 --> 00:04:02.309 align:start position:0%
piece spawns at the top. Then came one
of<00:04:00.799><c> the</c><00:04:00.959><c> most</c><00:04:01.200><c> satisfying</c><00:04:01.760><c> parts</c><00:04:02.000><c> of</c><00:04:02.159><c> the</c>

00:04:02.309 --> 00:04:02.319 align:start position:0%
of the most satisfying parts of the
 

00:04:02.319 --> 00:04:04.309 align:start position:0%
of the most satisfying parts of the
project,<00:04:02.720><c> the</c><00:04:02.879><c> line</c><00:04:03.200><c> clear.</c><00:04:03.519><c> I</c><00:04:03.760><c> cracked</c><00:04:04.080><c> this</c>

00:04:04.309 --> 00:04:04.319 align:start position:0%
project, the line clear. I cracked this
 

00:04:04.319 --> 00:04:06.070 align:start position:0%
project, the line clear. I cracked this
by<00:04:04.560><c> creating</c><00:04:04.799><c> a</c><00:04:04.959><c> function</c><00:04:05.280><c> that</c><00:04:05.519><c> constantly</c>

00:04:06.070 --> 00:04:06.080 align:start position:0%
by creating a function that constantly
 

00:04:06.080 --> 00:04:08.390 align:start position:0%
by creating a function that constantly
scans<00:04:06.480><c> every</c><00:04:06.799><c> single</c><00:04:07.200><c> row</c><00:04:07.280><c> in</c><00:04:07.439><c> the</c><00:04:07.599><c> matrix.</c><00:04:08.159><c> It</c>

00:04:08.390 --> 00:04:08.400 align:start position:0%
scans every single row in the matrix. It
 

00:04:08.400 --> 00:04:10.309 align:start position:0%
scans every single row in the matrix. It
asks,<00:04:08.720><c> "Does</c><00:04:09.040><c> this</c><00:04:09.280><c> row</c><00:04:09.439><c> contain</c><00:04:09.680><c> any</c><00:04:09.920><c> zeros?"</c>

00:04:10.309 --> 00:04:10.319 align:start position:0%
asks, "Does this row contain any zeros?"
 

00:04:10.319 --> 00:04:12.070 align:start position:0%
asks, "Does this row contain any zeros?"
And<00:04:10.480><c> if</c><00:04:10.560><c> the</c><00:04:10.720><c> answer</c><00:04:10.879><c> is</c><00:04:11.120><c> no,</c><00:04:11.439><c> then</c><00:04:11.599><c> the</c><00:04:11.840><c> row</c><00:04:11.920><c> is</c>

00:04:12.070 --> 00:04:12.080 align:start position:0%
And if the answer is no, then the row is
 

00:04:12.080 --> 00:04:14.710 align:start position:0%
And if the answer is no, then the row is
full.<00:04:12.319><c> When</c><00:04:12.480><c> a</c><00:04:12.720><c> row</c><00:04:12.799><c> is</c><00:04:12.959><c> deleted,</c><00:04:13.680><c> I</c><00:04:14.000><c> staple</c><00:04:14.480><c> a</c>

00:04:14.710 --> 00:04:14.720 align:start position:0%
full. When a row is deleted, I staple a
 

00:04:14.720 --> 00:04:16.629 align:start position:0%
full. When a row is deleted, I staple a
new<00:04:14.959><c> empty</c><00:04:15.519><c> row</c><00:04:15.599><c> to</c><00:04:15.840><c> the</c><00:04:15.920><c> very</c><00:04:16.160><c> top</c><00:04:16.320><c> of</c><00:04:16.479><c> the</c>

00:04:16.629 --> 00:04:16.639 align:start position:0%
new empty row to the very top of the
 

00:04:16.639 --> 00:04:18.550 align:start position:0%
new empty row to the very top of the
block<00:04:16.959><c> matrix</c><00:04:17.359><c> to</c><00:04:17.600><c> keep</c><00:04:17.680><c> the</c><00:04:17.919><c> board</c><00:04:18.160><c> the</c><00:04:18.400><c> same</c>

00:04:18.550 --> 00:04:18.560 align:start position:0%
block matrix to keep the board the same
 

00:04:18.560 --> 00:04:20.310 align:start position:0%
block matrix to keep the board the same
size.<00:04:18.959><c> I</c><00:04:19.199><c> ran</c><00:04:19.359><c> into</c><00:04:19.519><c> an</c><00:04:19.759><c> interesting</c><00:04:20.000><c> bug</c>

00:04:20.310 --> 00:04:20.320 align:start position:0%
size. I ran into an interesting bug
 

00:04:20.320 --> 00:04:22.310 align:start position:0%
size. I ran into an interesting bug
here.<00:04:20.639><c> Initially,</c><00:04:21.199><c> I</c><00:04:21.440><c> called</c><00:04:21.600><c> the</c><00:04:21.759><c> clear</c><00:04:22.240><c> row</c>

00:04:22.310 --> 00:04:22.320 align:start position:0%
here. Initially, I called the clear row
 

00:04:22.320 --> 00:04:23.670 align:start position:0%
here. Initially, I called the clear row
function<00:04:22.657><c> [music]</c><00:04:22.720><c> every</c><00:04:22.960><c> single</c><00:04:23.280><c> frame.</c>

00:04:23.670 --> 00:04:23.680 align:start position:0%
function [music] every single frame.
 

00:04:23.680 --> 00:04:25.350 align:start position:0%
function [music] every single frame.
This<00:04:23.840><c> meant</c><00:04:24.000><c> that</c><00:04:24.240><c> if</c><00:04:24.400><c> a</c><00:04:24.560><c> block</c><00:04:24.720><c> was</c><00:04:24.960><c> falling</c>

00:04:25.350 --> 00:04:25.360 align:start position:0%
This meant that if a block was falling
 

00:04:25.360 --> 00:04:27.350 align:start position:0%
This meant that if a block was falling
and<00:04:25.680><c> completed</c><00:04:26.000><c> a</c><00:04:26.400><c> row</c><00:04:26.479><c> before</c><00:04:26.720><c> it</c><00:04:26.960><c> actually</c>

00:04:27.350 --> 00:04:27.360 align:start position:0%
and completed a row before it actually
 

00:04:27.360 --> 00:04:29.350 align:start position:0%
and completed a row before it actually
landed,<00:04:27.840><c> the</c><00:04:28.160><c> row</c><00:04:28.320><c> would</c><00:04:28.479><c> vanish</c><00:04:28.880><c> as</c><00:04:29.199><c> the</c>

00:04:29.350 --> 00:04:29.360 align:start position:0%
landed, the row would vanish as the
 

00:04:29.360 --> 00:04:31.110 align:start position:0%
landed, the row would vanish as the
block<00:04:29.520><c> fell.</c><00:04:29.919><c> Turns</c><00:04:30.160><c> out</c><00:04:30.320><c> in</c><00:04:30.560><c> a</c><00:04:30.720><c> real-time</c>

00:04:31.110 --> 00:04:31.120 align:start position:0%
block fell. Turns out in a real-time
 

00:04:31.120 --> 00:04:32.629 align:start position:0%
block fell. Turns out in a real-time
program<00:04:31.440><c> like</c><00:04:31.600><c> this,</c><00:04:31.828><c> [music]</c><00:04:32.000><c> order</c><00:04:32.400><c> really</c>

00:04:32.629 --> 00:04:32.639 align:start position:0%
program like this, [music] order really
 

00:04:32.639 --> 00:04:34.310 align:start position:0%
program like this, [music] order really
matters.<00:04:33.040><c> I</c><00:04:33.199><c> had</c><00:04:33.280><c> to</c><00:04:33.360><c> refactor</c><00:04:33.759><c> the</c><00:04:33.919><c> logic</c><00:04:34.240><c> so</c>

00:04:34.310 --> 00:04:34.320 align:start position:0%
matters. I had to refactor the logic so
 

00:04:34.320 --> 00:04:36.390 align:start position:0%
matters. I had to refactor the logic so
that<00:04:34.479><c> the</c><00:04:34.720><c> row</c><00:04:34.880><c> check</c><00:04:35.199><c> happens</c><00:04:35.600><c> on</c><00:04:35.759><c> the</c><00:04:36.000><c> frame</c>

00:04:36.390 --> 00:04:36.400 align:start position:0%
that the row check happens on the frame
 

00:04:36.400 --> 00:04:37.990 align:start position:0%
that the row check happens on the frame
after<00:04:36.639><c> a</c><00:04:36.880><c> block</c><00:04:37.068><c> [music]</c><00:04:37.120><c> is</c><00:04:37.360><c> placed.</c><00:04:37.759><c> Let's</c>

00:04:37.990 --> 00:04:38.000 align:start position:0%
after a block [music] is placed. Let's
 

00:04:38.000 --> 00:04:39.510 align:start position:0%
after a block [music] is placed. Let's
just<00:04:38.160><c> say</c><00:04:38.400><c> you</c><00:04:38.639><c> can't</c><00:04:38.800><c> clear</c><00:04:39.040><c> the</c><00:04:39.199><c> garbage</c>

00:04:39.510 --> 00:04:39.520 align:start position:0%
just say you can't clear the garbage
 

00:04:39.520 --> 00:04:41.189 align:start position:0%
just say you can't clear the garbage
before<00:04:39.840><c> the</c><00:04:40.000><c> bins</c><00:04:40.320><c> out</c><00:04:40.479><c> on</c><00:04:40.639><c> the</c><00:04:40.720><c> curb.</c><00:04:41.120><c> Now</c>

00:04:41.189 --> 00:04:41.199 align:start position:0%
before the bins out on the curb. Now
 

00:04:41.199 --> 00:04:43.030 align:start position:0%
before the bins out on the curb. Now
that<00:04:41.360><c> I</c><00:04:41.520><c> had</c><00:04:41.600><c> a</c><00:04:41.759><c> falling</c><00:04:42.080><c> block,</c><00:04:42.400><c> I</c><00:04:42.639><c> needed</c><00:04:42.800><c> the</c>

00:04:43.030 --> 00:04:43.040 align:start position:0%
that I had a falling block, I needed the
 

00:04:43.040 --> 00:04:44.629 align:start position:0%
that I had a falling block, I needed the
actual<00:04:43.280><c> shapes.</c><00:04:43.840><c> And</c><00:04:43.919><c> this</c><00:04:44.080><c> is</c><00:04:44.160><c> where</c><00:04:44.320><c> I</c><00:04:44.479><c> used</c>

00:04:44.629 --> 00:04:44.639 align:start position:0%
actual shapes. And this is where I used
 

00:04:44.639 --> 00:04:46.469 align:start position:0%
actual shapes. And this is where I used
a<00:04:44.800><c> class</c><00:04:45.120><c> for</c><00:04:45.280><c> the</c><00:04:45.440><c> first</c><00:04:45.680><c> time</c><00:04:46.000><c> ever</c><00:04:46.240><c> in</c>

00:04:46.469 --> 00:04:46.479 align:start position:0%
a class for the first time ever in
 

00:04:46.479 --> 00:04:48.150 align:start position:0%
a class for the first time ever in
Python.<00:04:46.893><c> [screaming]</c><00:04:47.040><c> I</c><00:04:47.280><c> created</c><00:04:47.600><c> a</c><00:04:47.840><c> piece</c>

00:04:48.150 --> 00:04:48.160 align:start position:0%
Python. [screaming] I created a piece
 

00:04:48.160 --> 00:04:50.550 align:start position:0%
Python. [screaming] I created a piece
class<00:04:48.560><c> and</c><00:04:48.880><c> gave</c><00:04:49.120><c> each</c><00:04:49.360><c> shape</c><00:04:49.600><c> an</c><00:04:49.840><c> ID,</c><00:04:50.320><c> a</c>

00:04:50.550 --> 00:04:50.560 align:start position:0%
class and gave each shape an ID, a
 

00:04:50.560 --> 00:04:52.310 align:start position:0%
class and gave each shape an ID, a
color,<00:04:50.800><c> and</c><00:04:50.960><c> a</c><00:04:51.120><c> name.</c><00:04:51.520><c> By</c><00:04:51.680><c> the</c><00:04:51.759><c> way,</c><00:04:52.000><c> it</c><00:04:52.160><c> turns</c>

00:04:52.310 --> 00:04:52.320 align:start position:0%
color, and a name. By the way, it turns
 

00:04:52.320 --> 00:04:54.070 align:start position:0%
color, and a name. By the way, it turns
out<00:04:52.400><c> the</c><00:04:52.560><c> Tetris</c><00:04:52.960><c> pieces</c><00:04:53.280><c> have</c><00:04:53.520><c> really</c><00:04:53.759><c> funny</c>

00:04:54.070 --> 00:04:54.080 align:start position:0%
out the Tetris pieces have really funny
 

00:04:54.080 --> 00:04:56.070 align:start position:0%
out the Tetris pieces have really funny
names.<00:04:54.800><c> Representing</c><00:04:55.280><c> the</c><00:04:55.440><c> Tetris</c><00:04:55.840><c> shapes</c>

00:04:56.070 --> 00:04:56.080 align:start position:0%
names. Representing the Tetris shapes
 

00:04:56.080 --> 00:04:57.430 align:start position:0%
names. Representing the Tetris shapes
was<00:04:56.240><c> the</c><00:04:56.320><c> hardest</c><00:04:56.560><c> part</c><00:04:56.720><c> of</c><00:04:56.800><c> the</c><00:04:56.960><c> project</c><00:04:57.280><c> so</c>

00:04:57.430 --> 00:04:57.440 align:start position:0%
was the hardest part of the project so
 

00:04:57.440 --> 00:04:58.950 align:start position:0%
was the hardest part of the project so
far.<00:04:57.680><c> I</c><00:04:57.840><c> initially</c><00:04:58.160><c> tried</c><00:04:58.400><c> to</c><00:04:58.560><c> make</c><00:04:58.720><c> every</c>

00:04:58.950 --> 00:04:58.960 align:start position:0%
far. I initially tried to make every
 

00:04:58.960 --> 00:05:00.950 align:start position:0%
far. I initially tried to make every
piece<00:04:59.199><c> a</c><00:04:59.360><c> different</c><00:04:59.600><c> sized</c><00:04:59.840><c> array.</c><00:05:00.240><c> The</c><00:05:00.479><c> hero</c>

00:05:00.950 --> 00:05:00.960 align:start position:0%
piece a different sized array. The hero
 

00:05:00.960 --> 00:05:03.749 align:start position:0%
piece a different sized array. The hero
was<00:05:01.199><c> a</c><00:05:01.360><c> 4x1</c><00:05:01.840><c> array.</c><00:05:02.320><c> The</c><00:05:02.479><c> Smash</c><00:05:02.800><c> Boy</c><00:05:03.040><c> was</c><00:05:03.120><c> a</c><00:05:03.280><c> 2x</c>

00:05:03.749 --> 00:05:03.759 align:start position:0%
was a 4x1 array. The Smash Boy was a 2x
 

00:05:03.759 --> 00:05:05.430 align:start position:0%
was a 4x1 array. The Smash Boy was a 2x
two.<00:05:04.080><c> And</c><00:05:04.320><c> trying</c><00:05:04.479><c> to</c><00:05:04.639><c> write</c><00:05:04.800><c> a</c><00:05:04.960><c> dynamic</c>

00:05:05.430 --> 00:05:05.440 align:start position:0%
two. And trying to write a dynamic
 

00:05:05.440 --> 00:05:07.590 align:start position:0%
two. And trying to write a dynamic
system<00:05:05.759><c> that</c><00:05:06.000><c> could</c><00:05:06.160><c> insert</c><00:05:06.400><c> a</c><00:05:06.560><c> 4x1</c><00:05:07.120><c> array</c><00:05:07.360><c> and</c>

00:05:07.590 --> 00:05:07.600 align:start position:0%
system that could insert a 4x1 array and
 

00:05:07.600 --> 00:05:10.469 align:start position:0%
system that could insert a 4x1 array and
a<00:05:07.680><c> 2x2</c><00:05:08.240><c> array</c><00:05:08.479><c> into</c><00:05:08.639><c> a</c><00:05:08.800><c> 10x20</c><00:05:09.440><c> grid</c><00:05:09.840><c> and</c><00:05:10.160><c> rotate</c>

00:05:10.469 --> 00:05:10.479 align:start position:0%
a 2x2 array into a 10x20 grid and rotate
 

00:05:10.479 --> 00:05:12.469 align:start position:0%
a 2x2 array into a 10x20 grid and rotate
those<00:05:10.720><c> pieces</c><00:05:11.280><c> created</c><00:05:11.680><c> all</c><00:05:11.919><c> sorts</c><00:05:12.160><c> of</c><00:05:12.320><c> new</c>

00:05:12.469 --> 00:05:12.479 align:start position:0%
those pieces created all sorts of new
 

00:05:12.479 --> 00:05:14.230 align:start position:0%
those pieces created all sorts of new
problems<00:05:12.800><c> that</c><00:05:13.039><c> were</c><00:05:13.360><c> really</c><00:05:13.600><c> hard</c><00:05:13.759><c> for</c><00:05:13.919><c> me.</c>

00:05:14.230 --> 00:05:14.240 align:start position:0%
problems that were really hard for me.
 

00:05:14.240 --> 00:05:15.749 align:start position:0%
problems that were really hard for me.
So<00:05:14.400><c> finally</c><00:05:14.639><c> I</c><00:05:14.880><c> came</c><00:05:14.960><c> to</c><00:05:15.120><c> the</c><00:05:15.280><c> conclusion</c><00:05:15.600><c> that</c>

00:05:15.749 --> 00:05:15.759 align:start position:0%
So finally I came to the conclusion that
 

00:05:15.759 --> 00:05:17.830 align:start position:0%
So finally I came to the conclusion that
I<00:05:16.000><c> need</c><00:05:16.160><c> consistency</c><00:05:16.880><c> among</c><00:05:17.199><c> the</c><00:05:17.360><c> shapes</c><00:05:17.680><c> of</c>

00:05:17.830 --> 00:05:17.840 align:start position:0%
I need consistency among the shapes of
 

00:05:17.840 --> 00:05:19.990 align:start position:0%
I need consistency among the shapes of
my<00:05:18.000><c> pieces.</c><00:05:18.560><c> If</c><00:05:18.720><c> I</c><00:05:18.880><c> made</c><00:05:19.120><c> every</c><00:05:19.440><c> piece</c><00:05:19.840><c> live</c>

00:05:19.990 --> 00:05:20.000 align:start position:0%
my pieces. If I made every piece live
 

00:05:20.000 --> 00:05:22.629 align:start position:0%
my pieces. If I made every piece live
inside<00:05:20.240><c> a</c><00:05:20.400><c> 4x4</c><00:05:21.039><c> grid</c><00:05:21.280><c> of</c><00:05:21.440><c> zeros</c><00:05:21.759><c> and</c><00:05:21.919><c> ones,</c><00:05:22.400><c> the</c>

00:05:22.629 --> 00:05:22.639 align:start position:0%
inside a 4x4 grid of zeros and ones, the
 

00:05:22.639 --> 00:05:24.469 align:start position:0%
inside a 4x4 grid of zeros and ones, the
operation<00:05:23.199><c> became</c><00:05:23.759><c> identical</c><00:05:24.080><c> for</c><00:05:24.240><c> every</c>

00:05:24.469 --> 00:05:24.479 align:start position:0%
operation became identical for every
 

00:05:24.479 --> 00:05:26.183 align:start position:0%
operation became identical for every
shape.<00:05:24.800><c> Whether</c><00:05:24.960><c> it</c><00:05:25.120><c> was</c><00:05:25.199><c> a</c><00:05:25.520><c> long</c><00:05:25.759><c> bar</c><00:05:26.080><c> or</c>

00:05:26.183 --> 00:05:26.193 align:start position:0%
shape. Whether it was a long bar or
 

00:05:26.193 --> 00:05:27.909 align:start position:0%
shape. Whether it was a long bar or
[music]<00:05:26.400><c> a</c><00:05:26.639><c> square,</c><00:05:27.039><c> the</c><00:05:27.280><c> rotation,</c><00:05:27.759><c> the</c>

00:05:27.909 --> 00:05:27.919 align:start position:0%
[music] a square, the rotation, the
 

00:05:27.919 --> 00:05:29.830 align:start position:0%
[music] a square, the rotation, the
movement<00:05:28.320><c> would</c><00:05:28.560><c> all</c><00:05:28.720><c> be</c><00:05:29.039><c> identical</c><00:05:29.520><c> as</c><00:05:29.759><c> long</c>

00:05:29.830 --> 00:05:29.840 align:start position:0%
movement would all be identical as long
 

00:05:29.840 --> 00:05:31.510 align:start position:0%
movement would all be identical as long
as<00:05:30.000><c> the</c><00:05:30.160><c> shapes</c><00:05:30.479><c> were</c><00:05:30.720><c> the</c><00:05:30.880><c> same.</c><00:05:31.039><c> And</c><00:05:31.199><c> hey,</c>

00:05:31.510 --> 00:05:31.520 align:start position:0%
as the shapes were the same. And hey,
 

00:05:31.520 --> 00:05:33.430 align:start position:0%
as the shapes were the same. And hey,
before<00:05:31.680><c> I</c><00:05:31.840><c> knew</c><00:05:32.000><c> it,</c><00:05:32.320><c> I</c><00:05:32.560><c> had</c><00:05:32.800><c> seven</c><00:05:33.199><c> different</c>

00:05:33.430 --> 00:05:33.440 align:start position:0%
before I knew it, I had seven different
 

00:05:33.440 --> 00:05:35.749 align:start position:0%
before I knew it, I had seven different
Tetrainos<00:05:34.560><c> that</c><00:05:34.800><c> could</c><00:05:34.960><c> all</c><00:05:35.199><c> fall</c><00:05:35.440><c> at</c><00:05:35.600><c> a</c>

00:05:35.749 --> 00:05:35.759 align:start position:0%
Tetrainos that could all fall at a
 

00:05:35.759 --> 00:05:37.590 align:start position:0%
Tetrainos that could all fall at a
standard<00:05:36.000><c> rate.</c><00:05:36.400><c> With</c><00:05:36.639><c> the</c><00:05:36.800><c> pieces</c><00:05:37.199><c> working,</c>

00:05:37.590 --> 00:05:37.600 align:start position:0%
standard rate. With the pieces working,
 

00:05:37.600 --> 00:05:39.670 align:start position:0%
standard rate. With the pieces working,
I<00:05:37.759><c> wanted</c><00:05:37.919><c> to</c><00:05:38.080><c> add</c><00:05:38.240><c> the</c><00:05:38.479><c> hold</c><00:05:38.800><c> button.</c><00:05:39.199><c> Tetris</c>

00:05:39.670 --> 00:05:39.680 align:start position:0%
I wanted to add the hold button. Tetris
 

00:05:39.680 --> 00:05:41.189 align:start position:0%
I wanted to add the hold button. Tetris
lets<00:05:39.840><c> you</c><00:05:39.919><c> swap</c><00:05:40.240><c> your</c><00:05:40.400><c> current</c><00:05:40.639><c> falling</c><00:05:41.039><c> piece</c>

00:05:41.189 --> 00:05:41.199 align:start position:0%
lets you swap your current falling piece
 

00:05:41.199 --> 00:05:43.189 align:start position:0%
lets you swap your current falling piece
with<00:05:41.360><c> a</c><00:05:41.520><c> held</c><00:05:41.759><c> piece.</c><00:05:42.320><c> Storing</c><00:05:42.639><c> a</c><00:05:42.800><c> piece</c><00:05:43.039><c> for</c>

00:05:43.189 --> 00:05:43.199 align:start position:0%
with a held piece. Storing a piece for
 

00:05:43.199 --> 00:05:45.029 align:start position:0%
with a held piece. Storing a piece for
later<00:05:43.680><c> and</c><00:05:43.919><c> pulling</c><00:05:44.160><c> the</c><00:05:44.400><c> stored</c><00:05:44.720><c> one</c><00:05:44.880><c> back</c>

00:05:45.029 --> 00:05:45.039 align:start position:0%
later and pulling the stored one back
 

00:05:45.039 --> 00:05:46.230 align:start position:0%
later and pulling the stored one back
into<00:05:45.280><c> play</c><00:05:45.440><c> when</c><00:05:45.600><c> you</c><00:05:45.680><c> need</c><00:05:45.759><c> it.</c><00:05:46.000><c> This</c>

00:05:46.230 --> 00:05:46.240 align:start position:0%
into play when you need it. This
 

00:05:46.240 --> 00:05:47.749 align:start position:0%
into play when you need it. This
required<00:05:46.560><c> a</c><00:05:46.720><c> specific</c><00:05:47.039><c> kind</c><00:05:47.199><c> of</c><00:05:47.280><c> logic.</c><00:05:47.600><c> When</c>

00:05:47.749 --> 00:05:47.759 align:start position:0%
required a specific kind of logic. When
 

00:05:47.759 --> 00:05:49.029 align:start position:0%
required a specific kind of logic. When
you<00:05:47.840><c> hit</c><00:05:47.919><c> the</c><00:05:48.080><c> space</c><00:05:48.240><c> bar,</c><00:05:48.479><c> the</c><00:05:48.639><c> game</c><00:05:48.800><c> checks</c>

00:05:49.029 --> 00:05:49.039 align:start position:0%
you hit the space bar, the game checks
 

00:05:49.039 --> 00:05:50.469 align:start position:0%
you hit the space bar, the game checks
the<00:05:49.199><c> following</c><00:05:49.520><c> things.</c><00:05:49.840><c> If</c><00:05:50.000><c> the</c><00:05:50.080><c> whole</c><00:05:50.240><c> box</c>

00:05:50.469 --> 00:05:50.479 align:start position:0%
the following things. If the whole box
 

00:05:50.479 --> 00:05:52.230 align:start position:0%
the following things. If the whole box
is<00:05:50.639><c> empty,</c><00:05:51.039><c> it</c><00:05:51.199><c> takes</c><00:05:51.360><c> your</c><00:05:51.600><c> current</c><00:05:51.759><c> piece,</c>

00:05:52.230 --> 00:05:52.240 align:start position:0%
is empty, it takes your current piece,
 

00:05:52.240 --> 00:05:53.830 align:start position:0%
is empty, it takes your current piece,
puts<00:05:52.479><c> it</c><00:05:52.639><c> in</c><00:05:52.800><c> the</c><00:05:52.880><c> box,</c><00:05:53.120><c> and</c><00:05:53.280><c> spawns</c><00:05:53.600><c> a</c><00:05:53.680><c> new</c>

00:05:53.830 --> 00:05:53.840 align:start position:0%
puts it in the box, and spawns a new
 

00:05:53.840 --> 00:05:55.029 align:start position:0%
puts it in the box, and spawns a new
piece.<00:05:54.240><c> If</c><00:05:54.400><c> there's</c><00:05:54.560><c> already</c><00:05:54.800><c> something</c>

00:05:55.029 --> 00:05:55.039 align:start position:0%
piece. If there's already something
 

00:05:55.039 --> 00:05:57.029 align:start position:0%
piece. If there's already something
there,<00:05:55.520><c> it</c><00:05:55.759><c> performs</c><00:05:56.000><c> a</c><00:05:56.160><c> swap.</c><00:05:56.479><c> I</c><00:05:56.639><c> also</c><00:05:56.800><c> had</c><00:05:56.960><c> to</c>

00:05:57.029 --> 00:05:57.039 align:start position:0%
there, it performs a swap. I also had to
 

00:05:57.039 --> 00:05:58.790 align:start position:0%
there, it performs a swap. I also had to
add<00:05:57.199><c> a</c><00:05:57.280><c> variable</c><00:05:57.600><c> called</c><00:05:57.919><c> swapped</c><00:05:58.320><c> this</c><00:05:58.560><c> turn.</c>

00:05:58.790 --> 00:05:58.800 align:start position:0%
add a variable called swapped this turn.
 

00:05:58.800 --> 00:06:00.390 align:start position:0%
add a variable called swapped this turn.
In<00:05:59.039><c> Tetris,</c><00:05:59.520><c> you</c><00:05:59.680><c> aren't</c><00:05:59.840><c> allowed</c><00:06:00.000><c> to</c><00:06:00.160><c> swap</c>

00:06:00.390 --> 00:06:00.400 align:start position:0%
In Tetris, you aren't allowed to swap
 

00:06:00.400 --> 00:06:01.990 align:start position:0%
In Tetris, you aren't allowed to swap
your<00:06:00.560><c> pieces</c><00:06:00.880><c> back</c><00:06:01.039><c> and</c><00:06:01.199><c> forth</c><00:06:01.360><c> infinitely</c><00:06:01.840><c> to</c>

00:06:01.990 --> 00:06:02.000 align:start position:0%
your pieces back and forth infinitely to
 

00:06:02.000 --> 00:06:03.590 align:start position:0%
your pieces back and forth infinitely to
stay<00:06:02.160><c> alive.</c><00:06:02.560><c> You</c><00:06:02.639><c> get</c><00:06:02.800><c> one</c><00:06:02.960><c> swap</c><00:06:03.280><c> per</c><00:06:03.440><c> turn,</c>

00:06:03.590 --> 00:06:03.600 align:start position:0%
stay alive. You get one swap per turn,
 

00:06:03.600 --> 00:06:05.189 align:start position:0%
stay alive. You get one swap per turn,
and<00:06:03.759><c> then</c><00:06:03.919><c> that</c><00:06:04.160><c> window</c><00:06:04.400><c> closes</c><00:06:04.720><c> until</c><00:06:05.039><c> your</c>

00:06:05.189 --> 00:06:05.199 align:start position:0%
and then that window closes until your
 

00:06:05.199 --> 00:06:06.870 align:start position:0%
and then that window closes until your
next<00:06:05.440><c> piece</c><00:06:05.759><c> touches</c><00:06:06.080><c> the</c><00:06:06.240><c> ground.</c><00:06:06.560><c> So,</c><00:06:06.720><c> this</c>

00:06:06.870 --> 00:06:06.880 align:start position:0%
next piece touches the ground. So, this
 

00:06:06.880 --> 00:06:08.390 align:start position:0%
next piece touches the ground. So, this
variable<00:06:07.199><c> resets</c><00:06:07.600><c> every</c><00:06:07.840><c> time</c><00:06:07.919><c> the</c><00:06:08.160><c> player</c>

00:06:08.390 --> 00:06:08.400 align:start position:0%
variable resets every time the player
 

00:06:08.400 --> 00:06:10.309 align:start position:0%
variable resets every time the player
piece<00:06:08.800><c> reaches</c><00:06:09.199><c> the</c><00:06:09.360><c> ground.</c><00:06:09.759><c> At</c><00:06:09.919><c> a</c><00:06:10.080><c> certain</c>

00:06:10.309 --> 00:06:10.319 align:start position:0%
piece reaches the ground. At a certain
 

00:06:10.319 --> 00:06:11.590 align:start position:0%
piece reaches the ground. At a certain
point,<00:06:10.479><c> I</c><00:06:10.639><c> was</c><00:06:10.720><c> looking</c><00:06:10.880><c> at</c><00:06:11.039><c> my</c><00:06:11.199><c> game</c><00:06:11.360><c> and</c>

00:06:11.590 --> 00:06:11.600 align:start position:0%
point, I was looking at my game and
 

00:06:11.600 --> 00:06:12.870 align:start position:0%
point, I was looking at my game and
thought,<00:06:11.840><c> "This</c><00:06:12.160><c> is</c><00:06:12.319><c> really</c><00:06:12.560><c> starting</c><00:06:12.800><c> to</c>

00:06:12.870 --> 00:06:12.880 align:start position:0%
thought, "This is really starting to
 

00:06:12.880 --> 00:06:14.230 align:start position:0%
thought, "This is really starting to
look<00:06:13.039><c> like</c><00:06:13.199><c> Tetris.</c><00:06:13.354><c> [music]</c><00:06:13.759><c> The</c><00:06:13.919><c> pieces</c>

00:06:14.230 --> 00:06:14.240 align:start position:0%
look like Tetris. [music] The pieces
 

00:06:14.240 --> 00:06:16.230 align:start position:0%
look like Tetris. [music] The pieces
fall,<00:06:14.560><c> they</c><00:06:14.800><c> stack,</c><00:06:15.199><c> the</c><00:06:15.440><c> rows</c><00:06:15.600><c> clear,</c><00:06:16.000><c> new</c>

00:06:16.230 --> 00:06:16.240 align:start position:0%
fall, they stack, the rows clear, new
 

00:06:16.240 --> 00:06:17.909 align:start position:0%
fall, they stack, the rows clear, new
pieces<00:06:16.560><c> spawn,</c><00:06:17.039><c> you</c><00:06:17.199><c> could</c><00:06:17.360><c> even</c><00:06:17.600><c> hold</c><00:06:17.759><c> and</c>

00:06:17.909 --> 00:06:17.919 align:start position:0%
pieces spawn, you could even hold and
 

00:06:17.919 --> 00:06:19.270 align:start position:0%
pieces spawn, you could even hold and
swap."<00:06:18.240><c> And</c><00:06:18.319><c> for</c><00:06:18.479><c> a</c><00:06:18.560><c> brief</c><00:06:18.800><c> moment,</c><00:06:19.039><c> I</c><00:06:19.199><c> thought</c>

00:06:19.270 --> 00:06:19.280 align:start position:0%
swap." And for a brief moment, I thought
 

00:06:19.280 --> 00:06:20.950 align:start position:0%
swap." And for a brief moment, I thought
I<00:06:19.440><c> was</c><00:06:19.600><c> almost</c><00:06:19.759><c> done.</c><00:06:20.160><c> But</c><00:06:20.319><c> I</c><00:06:20.479><c> had</c><00:06:20.560><c> no</c><00:06:20.800><c> idea</c>

00:06:20.950 --> 00:06:20.960 align:start position:0%
I was almost done. But I had no idea
 

00:06:20.960 --> 00:06:22.550 align:start position:0%
I was almost done. But I had no idea
what<00:06:21.120><c> I</c><00:06:21.199><c> was</c><00:06:21.280><c> in</c><00:06:21.440><c> for.</c><00:06:21.680><c> So,</c><00:06:21.840><c> I</c><00:06:22.000><c> started</c><00:06:22.240><c> adding</c>

00:06:22.550 --> 00:06:22.560 align:start position:0%
what I was in for. So, I started adding
 

00:06:22.560 --> 00:06:23.990 align:start position:0%
what I was in for. So, I started adding
all<00:06:22.720><c> the</c><00:06:22.880><c> little</c><00:06:23.120><c> details</c><00:06:23.440><c> that</c><00:06:23.600><c> the</c><00:06:23.759><c> game</c>

00:06:23.990 --> 00:06:24.000 align:start position:0%
all the little details that the game
 

00:06:24.000 --> 00:06:25.670 align:start position:0%
all the little details that the game
still<00:06:24.160><c> needed.</c><00:06:24.560><c> First,</c><00:06:24.720><c> the</c><00:06:24.960><c> score.</c><00:06:25.360><c> Simple</c>

00:06:25.670 --> 00:06:25.680 align:start position:0%
still needed. First, the score. Simple
 

00:06:25.680 --> 00:06:27.189 align:start position:0%
still needed. First, the score. Simple
enough.<00:06:25.919><c> Then</c><00:06:26.160><c> I</c><00:06:26.319><c> added</c><00:06:26.560><c> a</c><00:06:26.720><c> gradually</c>

00:06:27.189 --> 00:06:27.199 align:start position:0%
enough. Then I added a gradually
 

00:06:27.199 --> 00:06:29.029 align:start position:0%
enough. Then I added a gradually
increasing<00:06:27.680><c> speed</c><00:06:28.000><c> curve.</c><00:06:28.479><c> The</c><00:06:28.639><c> longer</c><00:06:28.880><c> you</c>

00:06:29.029 --> 00:06:29.039 align:start position:0%
increasing speed curve. The longer you
 

00:06:29.039 --> 00:06:30.950 align:start position:0%
increasing speed curve. The longer you
survive,<00:06:29.440><c> the</c><00:06:29.600><c> faster</c><00:06:29.840><c> the</c><00:06:30.080><c> game</c><00:06:30.240><c> gets.</c><00:06:30.800><c> So</c>

00:06:30.950 --> 00:06:30.960 align:start position:0%
survive, the faster the game gets. So
 

00:06:30.960 --> 00:06:32.390 align:start position:0%
survive, the faster the game gets. So
every<00:06:31.199><c> time</c><00:06:31.280><c> a</c><00:06:31.520><c> line</c><00:06:31.680><c> was</c><00:06:31.840><c> cleared,</c><00:06:32.240><c> I</c>

00:06:32.390 --> 00:06:32.400 align:start position:0%
every time a line was cleared, I
 

00:06:32.400 --> 00:06:34.150 align:start position:0%
every time a line was cleared, I
shortened<00:06:32.720><c> the</c><00:06:32.960><c> drop</c><00:06:33.199><c> timer.</c><00:06:33.600><c> Next</c><00:06:33.759><c> was</c><00:06:34.000><c> game</c>

00:06:34.150 --> 00:06:34.160 align:start position:0%
shortened the drop timer. Next was game
 

00:06:34.160 --> 00:06:35.909 align:start position:0%
shortened the drop timer. Next was game
over<00:06:34.479><c> detection.</c><00:06:34.960><c> The</c><00:06:35.120><c> rule</c><00:06:35.360><c> was</c><00:06:35.520><c> simple.</c><00:06:35.759><c> If</c>

00:06:35.909 --> 00:06:35.919 align:start position:0%
over detection. The rule was simple. If
 

00:06:35.919 --> 00:06:37.579 align:start position:0%
over detection. The rule was simple. If
a<00:06:36.080><c> new</c><00:06:36.240><c> piece</c><00:06:36.560><c> spawns</c><00:06:37.039><c> and</c><00:06:37.120><c> immediately</c>

00:06:37.579 --> 00:06:37.589 align:start position:0%
a new piece spawns and immediately
 

00:06:37.589 --> 00:06:38.870 align:start position:0%
a new piece spawns and immediately
[music]<00:06:37.600><c> collides</c><00:06:38.000><c> with</c><00:06:38.080><c> a</c><00:06:38.240><c> permanent</c><00:06:38.560><c> block,</c>

00:06:38.870 --> 00:06:38.880 align:start position:0%
[music] collides with a permanent block,
 

00:06:38.880 --> 00:06:40.309 align:start position:0%
[music] collides with a permanent block,
then<00:06:39.039><c> we</c><00:06:39.199><c> know</c><00:06:39.280><c> that</c><00:06:39.440><c> the</c><00:06:39.600><c> board</c><00:06:39.759><c> is</c><00:06:39.919><c> full.</c>

00:06:40.309 --> 00:06:40.319 align:start position:0%
then we know that the board is full.
 

00:06:40.319 --> 00:06:42.070 align:start position:0%
then we know that the board is full.
There's<00:06:40.560><c> no</c><00:06:40.720><c> space.</c><00:06:41.199><c> Flip</c><00:06:41.440><c> the</c><00:06:41.600><c> game</c><00:06:41.759><c> over</c>

00:06:42.070 --> 00:06:42.080 align:start position:0%
There's no space. Flip the game over
 

00:06:42.080 --> 00:06:43.830 align:start position:0%
There's no space. Flip the game over
flag<00:06:42.319><c> and</c><00:06:42.479><c> reset</c><00:06:42.800><c> the</c><00:06:42.960><c> board.</c><00:06:43.280><c> Then</c><00:06:43.440><c> I</c><00:06:43.600><c> made</c><00:06:43.680><c> a</c>

00:06:43.830 --> 00:06:43.840 align:start position:0%
flag and reset the board. Then I made a
 

00:06:43.840 --> 00:06:45.990 align:start position:0%
flag and reset the board. Then I made a
piece<00:06:44.080><c> randomizer.</c><00:06:44.800><c> Easy</c><00:06:45.120><c> enough.</c><00:06:45.440><c> And</c><00:06:45.600><c> boom,</c>

00:06:45.990 --> 00:06:46.000 align:start position:0%
piece randomizer. Easy enough. And boom,
 

00:06:46.000 --> 00:06:48.070 align:start position:0%
piece randomizer. Easy enough. And boom,
look<00:06:46.080><c> at</c><00:06:46.240><c> my</c><00:06:46.400><c> game.</c><00:06:46.880><c> But</c><00:06:47.039><c> this</c><00:06:47.199><c> whole</c><00:06:47.440><c> time,</c><00:06:47.840><c> I</c>

00:06:48.070 --> 00:06:48.080 align:start position:0%
look at my game. But this whole time, I
 

00:06:48.080 --> 00:06:50.070 align:start position:0%
look at my game. But this whole time, I
was<00:06:48.240><c> tackling</c><00:06:48.639><c> the</c><00:06:48.800><c> easy</c><00:06:49.120><c> stuff</c><00:06:49.360><c> first</c><00:06:49.759><c> so</c><00:06:49.919><c> I</c>

00:06:50.070 --> 00:06:50.080 align:start position:0%
was tackling the easy stuff first so I
 

00:06:50.080 --> 00:06:51.670 align:start position:0%
was tackling the easy stuff first so I
didn't<00:06:50.240><c> have</c><00:06:50.400><c> to</c><00:06:50.560><c> face</c><00:06:50.720><c> the</c><00:06:51.039><c> scariest</c><00:06:51.520><c> problem</c>

00:06:51.670 --> 00:06:51.680 align:start position:0%
didn't have to face the scariest problem
 

00:06:51.680 --> 00:06:53.830 align:start position:0%
didn't have to face the scariest problem
that<00:06:51.919><c> I</c><00:06:52.080><c> had</c><00:06:52.160><c> to</c><00:06:52.319><c> solve,</c><00:06:52.720><c> rotation.</c><00:06:53.520><c> Block</c>

00:06:53.830 --> 00:06:53.840 align:start position:0%
that I had to solve, rotation. Block
 

00:06:53.840 --> 00:06:56.150 align:start position:0%
that I had to solve, rotation. Block
rotations<00:06:54.319><c> were</c><00:06:54.720><c> by</c><00:06:55.039><c> far</c><00:06:55.440><c> the</c><00:06:55.680><c> hardest</c><00:06:56.000><c> part</c>

00:06:56.150 --> 00:06:56.160 align:start position:0%
rotations were by far the hardest part
 

00:06:56.160 --> 00:06:57.990 align:start position:0%
rotations were by far the hardest part
of<00:06:56.319><c> this</c><00:06:56.560><c> entire</c><00:06:56.880><c> project.</c><00:06:57.440><c> You</c><00:06:57.600><c> see,</c><00:06:57.840><c> you</c>

00:06:57.990 --> 00:06:58.000 align:start position:0%
of this entire project. You see, you
 

00:06:58.000 --> 00:07:00.150 align:start position:0%
of this entire project. You see, you
can't<00:06:58.160><c> just</c><00:06:58.319><c> use</c><00:06:58.880><c> rot90</c><00:06:59.440><c> and</c><00:06:59.680><c> hope</c><00:06:59.840><c> for</c><00:07:00.000><c> the</c>

00:07:00.150 --> 00:07:00.160 align:start position:0%
can't just use rot90 and hope for the
 

00:07:00.160 --> 00:07:01.909 align:start position:0%
can't just use rot90 and hope for the
best.<00:07:00.560><c> The</c><00:07:00.720><c> problem</c><00:07:00.960><c> is</c><00:07:01.120><c> the</c><00:07:01.360><c> edge</c><00:07:01.599><c> of</c><00:07:01.759><c> the</c>

00:07:01.909 --> 00:07:01.919 align:start position:0%
best. The problem is the edge of the
 

00:07:01.919 --> 00:07:03.909 align:start position:0%
best. The problem is the edge of the
board.<00:07:02.319><c> If</c><00:07:02.479><c> your</c><00:07:02.639><c> piece</c><00:07:02.800><c> is</c><00:07:03.039><c> directly</c><00:07:03.599><c> against</c>

00:07:03.909 --> 00:07:03.919 align:start position:0%
board. If your piece is directly against
 

00:07:03.919 --> 00:07:06.309 align:start position:0%
board. If your piece is directly against
the<00:07:04.160><c> right</c><00:07:04.479><c> wall</c><00:07:04.720><c> and</c><00:07:04.960><c> you</c><00:07:05.199><c> rotate</c><00:07:05.440><c> a</c><00:07:05.680><c> 4x4</c>

00:07:06.309 --> 00:07:06.319 align:start position:0%
the right wall and you rotate a 4x4
 

00:07:06.319 --> 00:07:08.469 align:start position:0%
the right wall and you rotate a 4x4
piece,<00:07:06.720><c> part</c><00:07:06.960><c> of</c><00:07:07.039><c> that</c><00:07:07.280><c> piece</c><00:07:07.599><c> might</c><00:07:07.919><c> suddenly</c>

00:07:08.469 --> 00:07:08.479 align:start position:0%
piece, part of that piece might suddenly
 

00:07:08.479 --> 00:07:10.870 align:start position:0%
piece, part of that piece might suddenly
try<00:07:08.720><c> to</c><00:07:08.960><c> exist</c><00:07:09.280><c> at</c><00:07:09.684><c> [music]</c><00:07:09.840><c> coordinate</c><00:07:10.319><c> 11</c><00:07:10.720><c> on</c>

00:07:10.870 --> 00:07:10.880 align:start position:0%
try to exist at [music] coordinate 11 on
 

00:07:10.880 --> 00:07:12.950 align:start position:0%
try to exist at [music] coordinate 11 on
a<00:07:11.039><c> 10</c><00:07:11.280><c> wide</c><00:07:11.599><c> board,</c><00:07:12.000><c> the</c><00:07:12.160><c> code</c><00:07:12.400><c> tries</c><00:07:12.639><c> to</c><00:07:12.800><c> look</c>

00:07:12.950 --> 00:07:12.960 align:start position:0%
a 10 wide board, the code tries to look
 

00:07:12.960 --> 00:07:14.870 align:start position:0%
a 10 wide board, the code tries to look
for<00:07:13.120><c> that</c><00:07:13.360><c> square,</c><00:07:13.919><c> can't</c><00:07:14.160><c> find</c><00:07:14.319><c> it,</c><00:07:14.560><c> and</c><00:07:14.720><c> then</c>

00:07:14.870 --> 00:07:14.880 align:start position:0%
for that square, can't find it, and then
 

00:07:14.880 --> 00:07:16.309 align:start position:0%
for that square, can't find it, and then
the<00:07:15.039><c> game</c><00:07:15.280><c> crashes</c><00:07:15.579><c> [music]</c><00:07:15.599><c> with</c><00:07:15.759><c> an</c><00:07:15.919><c> index</c>

00:07:16.309 --> 00:07:16.319 align:start position:0%
the game crashes [music] with an index
 

00:07:16.319 --> 00:07:17.749 align:start position:0%
the game crashes [music] with an index
error.<00:07:16.560><c> This</c><00:07:16.720><c> happened</c><00:07:16.960><c> all</c><00:07:17.120><c> the</c><00:07:17.280><c> time.</c><00:07:17.520><c> To</c>

00:07:17.749 --> 00:07:17.759 align:start position:0%
error. This happened all the time. To
 

00:07:17.759 --> 00:07:19.029 align:start position:0%
error. This happened all the time. To
solve<00:07:17.919><c> this</c><00:07:18.080><c> problem,</c><00:07:18.400><c> I</c><00:07:18.560><c> had</c><00:07:18.639><c> to</c><00:07:18.800><c> create</c><00:07:18.880><c> a</c>

00:07:19.029 --> 00:07:19.039 align:start position:0%
solve this problem, I had to create a
 

00:07:19.039 --> 00:07:21.029 align:start position:0%
solve this problem, I had to create a
mask<00:07:19.360><c> for</c><00:07:19.520><c> each</c><00:07:19.759><c> piece.</c><00:07:20.080><c> Before</c><00:07:20.479><c> the</c><00:07:20.639><c> rotation</c>

00:07:21.029 --> 00:07:21.039 align:start position:0%
mask for each piece. Before the rotation
 

00:07:21.039 --> 00:07:22.309 align:start position:0%
mask for each piece. Before the rotation
actually<00:07:21.280><c> happens</c><00:07:21.520><c> on</c><00:07:21.680><c> the</c><00:07:21.840><c> screen,</c><00:07:22.080><c> the</c>

00:07:22.309 --> 00:07:22.319 align:start position:0%
actually happens on the screen, the
 

00:07:22.319 --> 00:07:24.309 align:start position:0%
actually happens on the screen, the
computer<00:07:22.639><c> runs</c><00:07:22.880><c> a</c><00:07:23.120><c> test</c><00:07:23.360><c> rotation</c><00:07:24.000><c> in</c><00:07:24.160><c> a</c>

00:07:24.309 --> 00:07:24.319 align:start position:0%
computer runs a test rotation in a
 

00:07:24.319 --> 00:07:26.070 align:start position:0%
computer runs a test rotation in a
hidden<00:07:24.639><c> variable.</c><00:07:25.039><c> It</c><00:07:25.199><c> checks</c><00:07:25.520><c> every</c><00:07:25.759><c> single</c>

00:07:26.070 --> 00:07:26.080 align:start position:0%
hidden variable. It checks every single
 

00:07:26.080 --> 00:07:28.309 align:start position:0%
hidden variable. It checks every single
one<00:07:26.479><c> in</c><00:07:26.800><c> that</c><00:07:26.960><c> ghost</c><00:07:27.280><c> shape</c><00:07:27.520><c> and</c><00:07:27.759><c> asks,</c><00:07:28.000><c> "Is</c>

00:07:28.309 --> 00:07:28.319 align:start position:0%
one in that ghost shape and asks, "Is
 

00:07:28.319 --> 00:07:29.749 align:start position:0%
one in that ghost shape and asks, "Is
this<00:07:28.479><c> outside</c><00:07:28.720><c> the</c><00:07:28.880><c> left</c><00:07:29.120><c> wall?</c><00:07:29.440><c> Is</c><00:07:29.599><c> this</c>

00:07:29.749 --> 00:07:29.759 align:start position:0%
this outside the left wall? Is this
 

00:07:29.759 --> 00:07:31.189 align:start position:0%
this outside the left wall? Is this
outside<00:07:30.000><c> the</c><00:07:30.160><c> right</c><00:07:30.319><c> wall?</c><00:07:30.720><c> Or</c><00:07:30.800><c> is</c><00:07:30.960><c> it</c>

00:07:31.189 --> 00:07:31.199 align:start position:0%
outside the right wall? Or is it
 

00:07:31.199 --> 00:07:32.390 align:start position:0%
outside the right wall? Or is it
overlapping<00:07:31.300><c> [music]</c><00:07:31.599><c> a</c><00:07:31.759><c> permanent</c><00:07:32.160><c> block?"</c>

00:07:32.390 --> 00:07:32.400 align:start position:0%
overlapping [music] a permanent block?"
 

00:07:32.400 --> 00:07:34.390 align:start position:0%
overlapping [music] a permanent block?"
And<00:07:32.560><c> if</c><00:07:32.639><c> the</c><00:07:32.800><c> answer</c><00:07:32.960><c> is</c><00:07:33.120><c> yes,</c><00:07:33.440><c> I</c><00:07:33.599><c> deploy</c><00:07:34.000><c> a</c>

00:07:34.390 --> 00:07:34.400 align:start position:0%
And if the answer is yes, I deploy a
 

00:07:34.400 --> 00:07:36.150 align:start position:0%
And if the answer is yes, I deploy a
wall<00:07:34.720><c> kick.</c><00:07:35.039><c> The</c><00:07:35.199><c> game</c><00:07:35.440><c> tries</c><00:07:35.599><c> to</c><00:07:35.680><c> nudge</c><00:07:36.000><c> the</c>

00:07:36.150 --> 00:07:36.160 align:start position:0%
wall kick. The game tries to nudge the
 

00:07:36.160 --> 00:07:37.670 align:start position:0%
wall kick. The game tries to nudge the
piece<00:07:36.400><c> one</c><00:07:36.560><c> square</c><00:07:36.800><c> to</c><00:07:36.960><c> the</c><00:07:37.120><c> left</c><00:07:37.199><c> or</c><00:07:37.360><c> right</c><00:07:37.520><c> to</c>

00:07:37.670 --> 00:07:37.680 align:start position:0%
piece one square to the left or right to
 

00:07:37.680 --> 00:07:39.510 align:start position:0%
piece one square to the left or right to
see<00:07:37.759><c> if</c><00:07:37.919><c> it</c><00:07:38.000><c> fits</c><00:07:38.240><c> in</c><00:07:38.400><c> a</c><00:07:38.479><c> new</c><00:07:38.639><c> orientation,</c><00:07:39.360><c> but</c>

00:07:39.510 --> 00:07:39.520 align:start position:0%
see if it fits in a new orientation, but
 

00:07:39.520 --> 00:07:41.270 align:start position:0%
see if it fits in a new orientation, but
if<00:07:39.680><c> it</c><00:07:39.840><c> still</c><00:07:40.080><c> doesn't,</c><00:07:40.560><c> then</c><00:07:40.720><c> the</c><00:07:40.880><c> rotation</c>

00:07:41.270 --> 00:07:41.280 align:start position:0%
if it still doesn't, then the rotation
 

00:07:41.280 --> 00:07:42.950 align:start position:0%
if it still doesn't, then the rotation
is<00:07:41.520><c> canceled.</c><00:07:41.919><c> It's</c><00:07:42.080><c> marked</c><00:07:42.319><c> as</c><00:07:42.479><c> invalid,</c><00:07:42.800><c> and</c>

00:07:42.950 --> 00:07:42.960 align:start position:0%
is canceled. It's marked as invalid, and
 

00:07:42.960 --> 00:07:44.629 align:start position:0%
is canceled. It's marked as invalid, and
the<00:07:43.120><c> rotation</c><00:07:43.520><c> doesn't</c><00:07:43.840><c> happen.</c><00:07:44.319><c> Solving</c>

00:07:44.629 --> 00:07:44.639 align:start position:0%
the rotation doesn't happen. Solving
 

00:07:44.639 --> 00:07:46.870 align:start position:0%
the rotation doesn't happen. Solving
this<00:07:44.880><c> without</c><00:07:45.120><c> AI</c><00:07:45.599><c> meant</c><00:07:45.840><c> hours</c><00:07:46.160><c> of</c><00:07:46.319><c> trial</c><00:07:46.639><c> and</c>

00:07:46.870 --> 00:07:46.880 align:start position:0%
this without AI meant hours of trial and
 

00:07:46.880 --> 00:07:48.790 align:start position:0%
this without AI meant hours of trial and
error<00:07:47.039><c> in</c><00:07:47.280><c> printing</c><00:07:47.599><c> out</c><00:07:47.919><c> coordinates</c><00:07:48.400><c> in</c><00:07:48.639><c> my</c>

00:07:48.790 --> 00:07:48.800 align:start position:0%
error in printing out coordinates in my
 

00:07:48.800 --> 00:07:50.285 align:start position:0%
error in printing out coordinates in my
terminal<00:07:49.199><c> to</c><00:07:49.440><c> see</c><00:07:49.599><c> where</c><00:07:49.840><c> the</c><00:07:50.000><c> numbers</c>

00:07:50.285 --> 00:07:50.295 align:start position:0%
terminal to see where the numbers
 

00:07:50.295 --> 00:07:51.670 align:start position:0%
terminal to see where the numbers
[music]<00:07:50.319><c> were</c><00:07:50.479><c> going</c><00:07:50.720><c> wrong.</c><00:07:51.199><c> When</c><00:07:51.360><c> I</c><00:07:51.520><c> finally</c>

00:07:51.670 --> 00:07:51.680 align:start position:0%
[music] were going wrong. When I finally
 

00:07:51.680 --> 00:07:53.430 align:start position:0%
[music] were going wrong. When I finally
got<00:07:51.840><c> the</c><00:07:52.000><c> herob</c><00:07:52.319><c> bar</c><00:07:52.479><c> to</c><00:07:52.639><c> rotate</c><00:07:52.960><c> against</c><00:07:53.199><c> the</c>

00:07:53.430 --> 00:07:53.440 align:start position:0%
got the herob bar to rotate against the
 

00:07:53.440 --> 00:07:55.270 align:start position:0%
got the herob bar to rotate against the
right<00:07:53.599><c> wall</c><00:07:53.840><c> without</c><00:07:54.160><c> crashing</c><00:07:54.479><c> the</c><00:07:54.720><c> game,</c><00:07:55.039><c> it</c>

00:07:55.270 --> 00:07:55.280 align:start position:0%
right wall without crashing the game, it
 

00:07:55.280 --> 00:07:57.029 align:start position:0%
right wall without crashing the game, it
was<00:07:55.360><c> the</c><00:07:55.520><c> biggest</c><00:07:55.759><c> high</c><00:07:56.000><c> of</c><00:07:56.080><c> the</c><00:07:56.319><c> project.</c><00:07:56.800><c> And</c>

00:07:57.029 --> 00:07:57.039 align:start position:0%
was the biggest high of the project. And
 

00:07:57.039 --> 00:07:58.869 align:start position:0%
was the biggest high of the project. And
with<00:07:57.280><c> block</c><00:07:57.599><c> rotations</c><00:07:58.160><c> working,</c><00:07:58.560><c> I</c><00:07:58.720><c> could</c>

00:07:58.869 --> 00:07:58.879 align:start position:0%
with block rotations working, I could
 

00:07:58.879 --> 00:08:00.629 align:start position:0%
with block rotations working, I could
actually<00:07:59.120><c> say</c><00:07:59.280><c> it.</c><00:07:59.520><c> I</c><00:07:59.759><c> made</c><00:07:59.919><c> a</c><00:08:00.080><c> Tetris</c><00:08:00.479><c> game</c>

00:08:00.629 --> 00:08:00.639 align:start position:0%
actually say it. I made a Tetris game
 

00:08:00.639 --> 00:08:02.150 align:start position:0%
actually say it. I made a Tetris game
from<00:08:00.800><c> scratch.</c><00:08:01.440><c> If</c><00:08:01.599><c> you've</c><00:08:01.759><c> made</c><00:08:01.840><c> it</c><00:08:02.000><c> this</c>

00:08:02.150 --> 00:08:02.160 align:start position:0%
from scratch. If you've made it this
 

00:08:02.160 --> 00:08:04.230 align:start position:0%
from scratch. If you've made it this
far,<00:08:02.639><c> please</c><00:08:02.879><c> consider</c><00:08:03.280><c> subscribing.</c><00:08:03.919><c> These</c>

00:08:04.230 --> 00:08:04.240 align:start position:0%
far, please consider subscribing. These
 

00:08:04.240 --> 00:08:05.510 align:start position:0%
far, please consider subscribing. These
videos<00:08:04.479><c> take</c><00:08:04.705><c> [music]</c><00:08:04.720><c> a</c><00:08:04.879><c> lot</c><00:08:04.960><c> of</c><00:08:05.120><c> work.</c>

00:08:05.510 --> 00:08:05.520 align:start position:0%
videos take [music] a lot of work.
 

00:08:05.520 --> 00:08:08.800 align:start position:0%
videos take [music] a lot of work.
That's<00:08:05.759><c> about</c><00:08:06.000><c> it.</c><00:08:06.400><c> See</c><00:08:06.560><c> you.</c>

