Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create levels 110-122 #1509

Merged
merged 9 commits into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 29 additions & 28 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions game/admin.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from django.contrib import admin

from game.models import Level, Block, Episode, Workspace
from game.models import Level, Block, Episode, Workspace, LevelDecor


class LevelAdmin(admin.ModelAdmin):
search_fields = ["name"]
search_fields = ["name", "id", "owner__user__username", "owner__user__first_name"]
raw_id_fields = ["next_level", "locked_for_class"]
readonly_fields = ["owner"]
list_display = ["name", "id", "episode", "owner"]
Expand All @@ -14,7 +14,13 @@ class WorkspaceAdmin(admin.ModelAdmin):
raw_id_fields = ["owner"]


class LevelDecorAdmin(admin.ModelAdmin):
search_fields = ["level__name"]
list_display = ["id", "level", "x", "y", "decorName"]


admin.site.register(Level, LevelAdmin)
admin.site.register(Workspace, WorkspaceAdmin)
admin.site.register(Episode)
admin.site.register(Block)
admin.site.register(LevelDecor, LevelDecorAdmin)
45 changes: 44 additions & 1 deletion game/end_to_end_tests/test_play_through.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,4 +378,47 @@ def test_level_108(self):
self._complete_level(108, check_algorithm_score=False)

def test_level_109(self):
self._complete_level(109, check_algorithm_score=False, final_level=True)
self._complete_level(109, check_algorithm_score=False)

def test_episode_12(self):
self._complete_episode(12, 110, check_algorithm_score=False)

def test_level_110(self):
self._complete_level(110, check_algorithm_score=False)

def test_level_111(self):
self._complete_level(111, check_algorithm_score=False)

def test_level_112(self):
self._complete_level(112)

def test_level_113(self):
self._complete_level(113, check_algorithm_score=False)

def test_level_114(self):
self._complete_level(114, check_algorithm_score=False)

def test_level_115(self):
self._complete_level(115, check_algorithm_score=False)

def test_level_116(self):
self._complete_level(116)

def test_level_117(self):
self._complete_level(117)

def test_level_118(self):
self._complete_level(118)

def test_level_119(self):
self._complete_level(119, check_algorithm_score=False)

def test_level_120(self):
self._complete_level(120, check_algorithm_score=False)

def test_level_121(self):
self._complete_level(121, check_algorithm_score=False)

def test_level_122(self):
self._complete_level(122, check_algorithm_score=False, final_level=True)

2 changes: 1 addition & 1 deletion game/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2422,7 +2422,7 @@ def hint_level109():
title_level114(),
"This route is just a bit longer. Make sure you type the Python code accurately!",
),
lambda: "The most common errors here are missing the round brackets at the end of the commands or mis-typing the commands, e.g. use my_van.move_fowards() and not my_van.move_foward()",
lambda: "The most common errors here are missing the round brackets at the end of the commands or mistyping the commands, e.g. use my_van.move_fowards() and not my_van.move_foward()",
)

(
Expand Down
Loading