Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
Menteur
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PLN
Menteur
Commits
ebe04bfa
Unverified
Commit
ebe04bfa
authored
Apr 04, 2020
by
PLN (Algolia)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: Move server to subfolder
parent
a1c60615
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
163 additions
and
161 deletions
+163
-161
.gitignore
.gitignore
+0
-144
.gitignore
server/.gitignore
+146
-0
__init__.py
server/model/__init__.py
+0
-0
animals.py
server/model/animals.py
+0
-0
card.py
server/model/card.py
+0
-0
data.py
server/model/data.py
+4
-4
deck.py
server/model/deck.py
+1
-1
hand.py
server/model/hand.py
+1
-1
hands.py
server/model/hands.py
+2
-2
known.py
server/model/known.py
+2
-2
requirements.txt
server/requirements.txt
+0
-0
__init__.py
server/test/__init__.py
+0
-0
test_data.py
server/test/test_data.py
+6
-6
test_game.py
server/test/test_game.py
+1
-1
No files found.
.gitignore
View file @
ebe04bfa
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# static files generated from Django application using `collectstatic`
media
static
# IDE
.idea/
server/.gitignore
0 → 100644
View file @
ebe04bfa
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# static files generated from Django application using `collectstatic`
media
static
# IDE
../.idea/
model/__init__.py
→
server/
model/__init__.py
View file @
ebe04bfa
File moved
model/animals.py
→
server/
model/animals.py
View file @
ebe04bfa
File moved
model/card.py
→
server/
model/card.py
View file @
ebe04bfa
File moved
model/data.py
→
server/
model/data.py
View file @
ebe04bfa
...
...
@@ -3,10 +3,10 @@ from collections import defaultdict
from
dataclasses
import
dataclass
from
typing
import
List
,
Dict
,
Optional
from
model.animals
import
random_animal_name
from
model.card
import
Card
from
model.deck
import
Deck
from
model.hand
import
Hand
from
server.model.hand
import
Hand
from
server.model.animals
import
random_animal_name
from
server.model.card
import
Card
from
server.model.deck
import
Deck
@dataclass
...
...
model/deck.py
→
server/
model/deck.py
View file @
ebe04bfa
from
random
import
randrange
,
shuffle
from
model.card
import
Card
,
Value
,
Color
from
server.
model.card
import
Card
,
Value
,
Color
class
Deck
:
...
...
model/hand.py
→
server/
model/hand.py
View file @
ebe04bfa
from
collections
import
Counter
from
typing
import
List
from
model.card
import
Card
from
server.
model.card
import
Card
class
Hand
:
...
...
model/hands.py
→
server/
model/hands.py
View file @
ebe04bfa
from
model.hand
import
Hand
from
model.card
import
Value
,
Color
,
Card
from
server.
model.hand
import
Hand
from
server.
model.card
import
Value
,
Color
,
Card
def
carre
(
value
)
->
Hand
:
...
...
model/known.py
→
server/
model/known.py
View file @
ebe04bfa
from
model.card
import
Value
,
Color
,
Card
from
model.hands
import
pair
,
single
,
double_pair
,
brelan
,
full
,
carre
from
server.
model.card
import
Value
,
Color
,
Card
from
server.
model.hands
import
pair
,
single
,
double_pair
,
brelan
,
full
,
carre
ACE_OF_HEARTS
=
Card
(
Value
.
Ace
,
Color
.
Hearts
)
ACE_OF_SPADES
=
Card
(
Value
.
Ace
,
Color
.
Spades
)
...
...
requirements.txt
→
server/
requirements.txt
View file @
ebe04bfa
File moved
test/__init__.py
→
server/
test/__init__.py
View file @
ebe04bfa
File moved
test/test_data.py
→
server/
test/test_data.py
View file @
ebe04bfa
from
unittest
import
TestCase
from
model.data
import
Player
from
model.deck
import
Deck
from
model.hand
import
Hand
from
model.card
import
Value
,
Color
,
Card
from
model.hands
import
full
,
brelan
,
pair
,
single
,
double_pair
,
carre
from
model.known
import
ACE_OF_HEARTS
,
PAIR_ACE
,
SINGLE_ACE
,
DOUBLE_PAIR_ACE
,
BRELAN_ACE
,
FULL_ACE
from
server.
model.data
import
Player
from
server.
model.deck
import
Deck
from
server.
model.hand
import
Hand
from
server.
model.card
import
Value
,
Color
,
Card
from
server.
model.hands
import
full
,
brelan
,
pair
,
single
,
double_pair
,
carre
from
server.
model.known
import
ACE_OF_HEARTS
,
PAIR_ACE
,
SINGLE_ACE
,
DOUBLE_PAIR_ACE
,
BRELAN_ACE
,
FULL_ACE
class
TestDeck
(
TestCase
):
...
...
test/test_game.py
→
server/
test/test_game.py
View file @
ebe04bfa
from
unittest
import
TestCase
from
model.data
import
Game
,
Player
from
server.
model.data
import
Game
,
Player
class
TestGame
(
TestCase
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment