Skip to content

Commit

Permalink
Merge pull request #68 from MatthewAndreTaylor/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
MatthewAndreTaylor authored Apr 5, 2024
2 parents bc912da + 152b01c commit f35e991
Show file tree
Hide file tree
Showing 121 changed files with 9,889 additions and 46 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/bandit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: "Bandit Security Analysis Action"
on: pull_request

jobs:
security_analysis:
name: "Bandit Action"
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install bandit
- name: Run Bandit
run: |
bandit -r .
4 changes: 2 additions & 2 deletions .github/workflows/branch_naming.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Assert Branch Naming Convention'
name: "Assert Branch Naming Convention"
on: pull_request

jobs:
Expand All @@ -10,4 +10,4 @@ jobs:
regex: '^.*-u\d+$'
ignore: master,development
min_length: 5
max_length: 20
max_length: 25
6 changes: 3 additions & 3 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- uses: pre-commit/action@v3.0.1
27 changes: 27 additions & 0 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Application Tests

on:
- push
- pull_request

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: ["3.9"]

steps:
- uses: actions/checkout@v2
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
pip install tox tox-gh-actions
- name: Run tests
run: tox
36 changes: 18 additions & 18 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
__pyc*
build
dist
.idea
.vscode
.tox
.pytest_cache
__pycache__/*
*.so
*.pyd
*.egg-info
*.whl
.venv
venv
instance
.DS_Store
__pycache__
*.pyc
__pyc*
build
dist
.idea
.vscode
.tox
.pytest_cache
__pycache__/*
*.so
*.pyd
*.egg-info
*.whl
.venv
venv
instance
.DS_Store
__pycache__
*.pyc
38 changes: 17 additions & 21 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,17 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: requirements-txt-fixer
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/hhatto/autopep8
rev: v2.0.4
hooks:
- id: autopep8
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.8.0
hooks:
- id: mypy
additional_dependencies: [types-all]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v2.3.0
hooks:
- id: check-yaml
- id: check-ast
- id: end-of-file-fixer
- id: trailing-whitespace
- id: requirements-txt-fixer
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.1.0
hooks:
- id: prettier
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
build:
pip install -r requirements.txt

clean:
rm -rf `find . -name __pycache__`
rm -rf `find . -name instance`
rm -rf .pytest_cache
rm -rf *.egg-info
rm -rf build
rm -rf dist
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,82 @@
# Snowfall-Saga

CSC301 Project

## Project Description

Snowfall-Saga is a web-based game developed as part of the CSC301 course.
It is a multiplayer game where players control characters in a snowy landscape socialize and compete against each other. ❄

### Features ⚙:

- Engaging multiplayer gameplay
- Beautiful snowy landscape
- Unique character control
- Social interaction elements
- Competitive challenges and rewards

### Technologies Used 👨‍💻:

- HTML5 <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/html5/html5-original.svg">

- CSS3 <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/css3/css3-original.svg">

- JavaScript <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/javascript/javascript-original.svg">

- Python <img height="20" alt="python" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/python/python-original.svg">

- Flask <img height="20" alt="flask" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/flask/flask-original.svg">

- WebSockets <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/socketio/socketio-original.svg">

- Github Actions <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/githubactions/githubactions-original.svg">

- PyTest <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/pytest/pytest-original.svg">

- SQLAlchemy <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/sqlalchemy/sqlalchemy-original.svg">

- Docker <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/docker/docker-original.svg">

- JSON <img height="20" alt="javascript" src="https://raw.githubusercontent.com/devicons/devicon/master/icons/json/json-original.svg">

- Jinja Templates

### Project Goals 🎯:

- Realtime multiplayer games running between different users.-
- Users can socialize in the lobby (Make friends, send messages, throw snowballs, change cosmetics).
- Users can login move around check thier stats gain points.
- Users can create different independant game rooms to play in.

### Future Goals 🗻:

- Move to protocol buffers for smaller socket message sizes.
- Create python wrappers for networked game objects.

## Getting setup 🏗:

Docker:

```bash
docker compose up
```

Build locally:

```bash
make
```

## Services 🕹:

- Lobby 👋

- Matchmaker ⚔

- Blizzard Bounce ❄

- Chess ♟

- Trivia 🙋‍♂️

- Type racing 🏇
32 changes: 32 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
version: "3"

services:
lobby_service:
build: ./lobby_service
ports:
- "5000:5000"

matchmaker:
build: ./gameservices/matchmaker
ports:
- "5001:5001"

blizzard_bounce:
build: ./gameservices/blizzard_bounce
ports:
- "8001:8001"

trivia:
build: ./gameservices/trivia
ports:
- "8002:8002"

type_race:
build: ./gameservices/type_race
ports:
- "8003:8003"

chess:
build: ./gameservices/chess
ports:
- "8004:8004"
18 changes: 18 additions & 0 deletions gameservices/blizzard_bounce/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
FROM ubuntu

ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get -y install gcc mono-mcs && \
rm -rf /var/lib/apt/lists/*

FROM python:3.9

WORKDIR /app

COPY . /app

RUN pip install --no-cache-dir -r requirements.txt

EXPOSE 8001

CMD ["python", "run.py"]
Loading

0 comments on commit f35e991

Please sign in to comment.