Skip to content

Commit

Permalink
Merge bee3fd2 into 52a355a
Browse files Browse the repository at this point in the history
  • Loading branch information
mristin committed Dec 23, 2022
2 parents 52a355a + bee3fd2 commit 04bffc2
Show file tree
Hide file tree
Showing 71 changed files with 1,901 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
*.ogg filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text
*.jpg filter=lfs diff=lfs merge=lfs -text
*.gif filter=lfs diff=lfs merge=lfs -text
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI

on:
push:
branches: [ master, main ]
tags: [ "**" ]
pull_request:
branches: [ "**" ]

jobs:
Execute-continuous-integration:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9']

steps:
- uses: actions/checkout@master
with:
lfs: 'true'

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python3 -m pip install --upgrade pip
pip3 install --upgrade coveralls
pip3 install -e .[dev]
- name: Run checks
run: |
python3 continuous_integration/precommit.py
- name: Upload Coverage
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.python-version }}
COVERALLS_PARALLEL: true

Finish-Coveralls:
name: Finish Coveralls
needs: Execute-continuous-integration
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finish Coveralls
run: |
pip3 install --upgrade coveralls
coveralls --finish --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63 changes: 63 additions & 0 deletions .github/workflows/release-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: release-package

on:
push:
tags:
- 'v*'

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
with:
lfs: 'true'

- name: Infer the version from the github ref
id: inferVersion
run: |
$prefix = "refs/tags/v"
if (!${env:GITHUB_REF}.StartsWith($prefix))
{
throw "Unexpected GITHUB_REF: ${env:GITHUB_REF}"
}
$version = ${env:GITHUB_REF}.Substring($prefix.Length)
Write-Host "The version is: $version"
if ($version.Contains("'"))
{
throw "Unexpected version containing a single quote: $version"
}
if ($version.Contains('"'))
{
throw "Unexpected version containing a double quote: $version"
}
if ($version.Contains(':'))
{
throw "Unexpected version containing a full colon: $version"
}
Write-Output "::set-output name=version::$version"
- uses: actions/setup-python@v2
with:
python-version: '3.9'
architecture: 'x64'

- name: Install dependencies
run: pip3 install -e .[dev]

- name: Package the release
run: |
pyinstaller.exe .\danceamole\main.py --name dance-a-mole --add-data "danceamole;."
cd dist
Compress-Archive -Path dance-a-mole dance-a-mole.${{ steps.inferVersion.outputs.version }}.win-x64.zip
- name: Upload the release assets
uses: AButler/upload-release-assets@v2.0
with:
files: "dist/dance-a-mole.${{ steps.inferVersion.outputs.version }}.win-x64.zip"
repo-token: ${{ secrets.GITHUB_TOKEN }}
release-tag: "v${{ steps.inferVersion.outputs.version }}"
3 changes: 3 additions & 0 deletions .idea/.gitignore

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

51 changes: 51 additions & 0 deletions .idea/csv-plugin.xml

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

14 changes: 14 additions & 0 deletions .idea/dance-a-mole-desktop.iml

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

82 changes: 82 additions & 0 deletions .idea/inspectionProfiles/Project_Default.xml

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

6 changes: 6 additions & 0 deletions .idea/inspectionProfiles/profiles_settings.xml

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

4 changes: 4 additions & 0 deletions .idea/misc.xml

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

8 changes: 8 additions & 0 deletions .idea/modules.xml

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

6 changes: 6 additions & 0 deletions .idea/vcs.xml

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

7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*********
Changelog
*********

0.0.1 (2022-12-23)
==================
This is the first, kick-off version ready for the first reviews.
2 changes: 0 additions & 2 deletions README.md

This file was deleted.

57 changes: 57 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
************
dance-a-mole
************

Dance the moles back into their holes instead of whacking them.

.. image:: https://github.com/mristin/dance-a-mole-desktop/actions/workflows/ci.yml/badge.svg
:target: https://github.com/mristin/dance-a-mole-desktop/actions/workflows/ci.yml
:alt: Continuous integration

.. image:: https://media.githubusercontent.com/media/mristin/dance-a-mole-desktop/main/screenshot.png
:alt: Screenshot

Installation
============
Download and unzip a version of the game from the `Releases`_.

.. _Releases: https://github.com/mristin/dance-a-mole-desktop/releases

Running
=======
You need to connect the dance mat *before* starting the game.

Run ``dance-a-mole.exe`` (in the directory where you unzipped the game).

If you have multiple joysticks attached, the first joystick is automatically selected, and assumed to be the dance mat.

If the first joystick does not correspond to your dance mat, list the available joysticks with the following command in the command prompt:

.. code-block::
dance-a-mole.exe --list_joysticks
You will see the names and unique IDs (GUIDs) of your joysticks.
Select the joystick that you wish by providing its GUI.
For example:

.. code-block::
dance-a-mole.exe -joystick 03000000790000001100000000000000
Which dance mat to use?
=======================
We used an unbranded dance mat which you can order, say, from Amazon:
https://www.amazon.com/OSTENT-Non-Slip-Dancing-Dance-Compatible-PC/dp/B00FJ2KT8M

Please let us know by `creating an issue`_ if you tested the game with other mats!

.. _creating an issue: https://github.com/mristin/dance-a-mole-desktop/issues/new

Acknowledgments
===============
The mole sprites and the background were taken from: https://github.com/lepunk/react-native-videos/tree/whack-a-mole/WhackAMole/assets

The hour glass sprite has been taken from: https://olgas-lab.itch.io/hourglass

The sprites of vegetables have been taken from: https://opengameart.org/content/2d-vegetables
1 change: 1 addition & 0 deletions continuous_integration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""Provide scripts for the continuous integration."""

0 comments on commit 04bffc2

Please sign in to comment.