{"id":17384578,"url":"https://github.com/pgdr/constellation-perseus","last_synced_at":"2025-03-27T21:18:34.608Z","repository":{"id":139058181,"uuid":"183778940","full_name":"pgdr/constellation-perseus","owner":"pgdr","description":"Mark I Colonial Viper, equipped with kinetic energy weapons and conventional missiles","archived":false,"fork":false,"pushed_at":"2019-05-04T09:50:31.000Z","size":162,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T23:42:08.689Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pgdr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-04-27T13:51:45.000Z","updated_at":"2019-05-04T09:50:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"3344f501-7e9d-495b-be8b-eee8536ce4c4","html_url":"https://github.com/pgdr/constellation-perseus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgdr%2Fconstellation-perseus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgdr%2Fconstellation-perseus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgdr%2Fconstellation-perseus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pgdr%2Fconstellation-perseus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pgdr","download_url":"https://codeload.github.com/pgdr/constellation-perseus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245924501,"owners_count":20694731,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-16T07:45:55.660Z","updated_at":"2025-03-27T21:18:34.560Z","avatar_url":"https://github.com/pgdr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# constellation-perseus [![Build Status](https://travis-ci.org/pgdr/constellation-perseus.svg?branch=master)](https://travis-ci.org/pgdr/constellation-perseus)\n\nMark I Colonial Viper, equipped with kinetic energy weapons and conventional missiles\n\n\n## Contract-driven Game development\n\nWe are using [`icontract`](https://pypi.org/project/icontract/) for\ncontract driven development, where we can specify **class invariants**\nwith `icontract.invariant`:\n\n```python\nimport icontract\n\n@icontract.invariant(lambda self: 0 \u003c= self.damage \u003c= 1))\n@dataclass(eq=False)\nclass Ship(GameObject):\n    owner: Player\n    damage: float = 1.0\n```\n\n**pre-conditions** with `icontract.require`:\n\n```python\n@icontract.require(lambda obj: isinstance(obj, GameObject))\n@icontract.require(lambda pos: isinstance(pos, Position))\ndef assign_position(self, obj: GameObject, pos: Position) -\u003e Position:\n    pass\n```\n\n\n\nand **post-conditions** with `icontract.ensure`:\n\n```python\n@icontract.ensure(lambda result: isinstance(result, Position))\ndef add(self, obj: GameObject, pos: Position = None, ...):\n    ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgdr%2Fconstellation-perseus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpgdr%2Fconstellation-perseus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpgdr%2Fconstellation-perseus/lists"}