Skip to content

Commit

Permalink
delete unused methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Akuli committed Dec 8, 2023
1 parent 690ab55 commit 1c34367
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 24 deletions.
12 changes: 0 additions & 12 deletions examples/aoc2023/day07/part1.jou
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ class Hand:
n++
return n

def find_distinct_letters(self, count: int*, distinct_letters: byte[5]*) -> void:
*count = 0

for i = 0; i < 5; i++:
seen = False
for k = 0; k < *count; k++:
if (*distinct_letters)[k] == self->letters[i]:
seen = True
break
if not seen:
(*distinct_letters)[(*count)++] = self->letters[i]

def all_same(self) -> bool:
return self->count(self->letters[0]) == 5

Expand Down
12 changes: 0 additions & 12 deletions examples/aoc2023/day07/part2.jou
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,6 @@ class Hand:
n++
return n

def find_distinct_letters(self, count: int*, distinct_letters: byte[5]*) -> void:
*count = 0

for i = 0; i < 5; i++:
seen = False
for k = 0; k < *count; k++:
if (*distinct_letters)[k] == self->letters[i]:
seen = True
break
if not seen:
(*distinct_letters)[(*count)++] = self->letters[i]

def all_same(self) -> bool:
return self->count(self->letters[0]) == 5

Expand Down

0 comments on commit 1c34367

Please sign in to comment.