Skip to content
This repository has been archived by the owner on Aug 7, 2024. It is now read-only.

Test Plan

Olaf Szmidt edited this page Oct 20, 2017 · 22 revisions

Prerequisites

  • Delete the database file in example_project/example_project/db.sqlite3.

Level 1

Check the following:

Prior to playing the game:

  • The level exists already. Check it by navigating to the Watch->Level.
  • If required, you can login using your details (admin:admin default).
  • You are at the correct URL (/players/watch_level/1/).
  • It consists of five square boxes lined horizontally. The leftmost is at (-2,0), the right most at (2,0).
  • There is no player on the screen. Nothing is happening.

Programming the game:

  • Program the game (Program-> Level1) and end up in the correct URL (players/program_level/1/).
  • Ensure the code will be able to move the character to the right 4 times. Default code will suffice (see below to copy).
  • Click the save button. Now go to Watch->Level1 via the menu (or press the Watch hotlink above the editor).
  • See the character moving. It should stop when it gets to red box at (2,0).
class Avatar(object):
    def handle_turn(self, world_view, events):
        from simulation.action import MoveAction
        from simulation.direction import ALL_DIRECTIONS
        import random

        return MoveAction(random.choice(ALL_DIRECTIONS))

Custom Games

Check the following:

Prior to playing the game: *

Clone this wiki locally