Skip to content

Commit

Permalink
Merge pull request #141 from AVEgame/mscroggs/new_game
Browse files Browse the repository at this point in the history
Mscroggs/new game
  • Loading branch information
mscroggs authored Jul 24, 2020
2 parents 62be6f4 + f4b7550 commit d9292af
Show file tree
Hide file tree
Showing 7 changed files with 637 additions and 5 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.7
1.9.8
27 changes: 27 additions & 0 deletions ave/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,30 @@ def generate_json(game_folder=config.games_folder):
"filename": game.filename,
"number": game.number
} for game in ave.games]


def test_game():
"""Test an AVE game for errors."""
import argparse

parser = argparse.ArgumentParser(
description='Test an AVE game for errors.')
parser.add_argument('file', metavar='file',
help='A file to test')

args = parser.parse_args()

from ave import load_game_from_file
from ave.test import check_game

game = load_game_from_file(args.file)
game.load()

errors = check_game(game)

for i in range(5, 0, -1):
ls = [e for e in errors if e.error_value == i]
if len(ls) > 0:
print("")
for e in ls:
print(e)
2 changes: 1 addition & 1 deletion ave/gamelist.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[{"title": "The Wonderful Tea Journey", "author": "Matthew Scroggs & Gin Grasso", "desc": "You're ready to start your epic adventure. But first, how about a lovely cup of tea?", "active": true, "version": 1, "ave_version": [0], "filename": "tea.ave", "number": 0}, {"title": "Welcome to Lower Mudville", "author": "Matthew Scroggs", "desc": "Explore this randomly generated village. What will you discover?", "active": true, "version": 1, "ave_version": [1, 9], "filename": "random.ave", "number": 3}, {"title": "Moscow", "author": "Alex Bolton", "desc": "", "active": true, "version": 1, "ave_version": [0], "filename": "moscow.ave", "number": 4}, {"title": "How to Write Your Own Game", "author": "Matthew Scroggs", "desc": "This game will guide you through the process of writing your own game.", "active": true, "version": 1, "ave_version": [0], "filename": "make.ave", "number": 10}, {"title": "Test Game", "author": "Matthew Scroggs", "desc": "This game is very boring and so should only be used to test features.", "active": false, "version": 1, "ave_version": [1, 9], "filename": "test.ave", "number": 99}, {"title": "Shopping Simulator", "author": "Billy Buxton", "desc": "In this game, you go shopping.", "active": false, "version": 1, "ave_version": [0], "filename": "shop.ave", "number": null}]
[{"title": "The Wonderful Tea Journey", "author": "Matthew Scroggs & Gin Grasso", "desc": "You're ready to start your epic adventure. But first, how about a lovely cup of tea?", "active": true, "version": 1, "ave_version": [0], "filename": "tea.ave", "number": 0}, {"title": "T2: The Wonderful Mystery Journey", "author": "Matthew Scroggs & Gin Grasso", "desc": "You're ready to start your epic adventure. But first, whodunnit?", "active": true, "version": 1, "ave_version": [0], "filename": "murder.ave", "number": 1}, {"title": "Moscow", "author": "Alex Bolton", "desc": "", "active": true, "version": 1, "ave_version": [0], "filename": "moscow.ave", "number": 3}, {"title": "Welcome to Lower Mudville", "author": "Matthew Scroggs", "desc": "Explore this randomly generated village. What will you discover?", "active": true, "version": 1, "ave_version": [1, 9], "filename": "random.ave", "number": 4}, {"title": "How to Write Your Own Game", "author": "Matthew Scroggs", "desc": "This game will guide you through the process of writing your own game.", "active": true, "version": 1, "ave_version": [0], "filename": "make.ave", "number": 10}, {"title": "Test Game", "author": "Matthew Scroggs", "desc": "This game is very boring and so should only be used to test features.", "active": false, "version": 1, "ave_version": [1, 9], "filename": "test.ave", "number": 99}, {"title": "Shopping Simulator", "author": "Billy Buxton", "desc": "In this game, you go shopping.", "active": false, "version": 1, "ave_version": [0], "filename": "shop.ave", "number": null}]
2 changes: 1 addition & 1 deletion games/moscow.ave
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
== Moscow ==
-- --
** Alex Bolton **
@@ 4 @@
@@ 3 @@
vv 1 vv

# start
Expand Down
Loading

0 comments on commit d9292af

Please sign in to comment.