updated day 20 for a small issue
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 22 Dec 2020 16:21:26 +0000 (10:21 -0600)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Tue, 22 Dec 2020 16:21:26 +0000 (10:21 -0600)
day20.onyx

index 6cbc048c0ab39fae8ef09c30f29d397712e51b4f..d6c10725c5699bf5f2f5bb3e255fa3f99781ecd2 100644 (file)
@@ -209,8 +209,8 @@ sea_monster := u8.[
 scan_for_monsters :: proc (forest: ^u8, ori: TO, width: u32, height: u32) -> bool {
     found_monsters := false;
 
-    for y: 0 .. height - sea_monster_height - 1 {
-        for x: 0 .. width - sea_monster_width - 1 {
+    for y: 0 .. height - sea_monster_height {
+        for x: 0 .. width - sea_monster_width {
             is_monster := true;
 
             for my: 0 .. sea_monster_height {