* Adding the base of our API * Little file and lint adjustments * Adding the lint command to Makefile * Adding the Minesweeper logic for game creation * Adding some tests for the Minesweeper algorithm * Adding some tools command to Makefile like pre-commit and pip-tools * Adding test help text to Makefile * all new user is_staff=True, for development for now * Now we can get the data from specific game Adding game status Adding game status Fixing game models
69 lines
2.0 KiB
Python
69 lines
2.0 KiB
Python
# Generated by Django 3.1.3 on 2020-11-06 02:25
|
|
|
|
from django.db import migrations, models
|
|
import django_mysql.models
|
|
import game.models
|
|
import internal.utils
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("game", "0001_initial"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AddField(
|
|
model_name="game",
|
|
name="status",
|
|
field=models.IntegerField(
|
|
choices=[(0, "NOT_PLAYED"), (1, "PLAYING"), (2, "FINISHED")],
|
|
default=game.models.GameStatuses["NOT_PLAYED"],
|
|
help_text="Actual game status",
|
|
),
|
|
),
|
|
migrations.AddField(
|
|
model_name="game",
|
|
name="win",
|
|
field=models.BooleanField(
|
|
blank=True,
|
|
default=None,
|
|
help_text="Did the user win the game?",
|
|
null=True,
|
|
verbose_name="Win?",
|
|
),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="game",
|
|
name="board",
|
|
field=django_mysql.models.JSONField(
|
|
default=internal.utils.empty_list,
|
|
help_text="Whe generated board game",
|
|
verbose_name="Generated board",
|
|
),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="game",
|
|
name="cols",
|
|
field=models.PositiveIntegerField(
|
|
default=10, help_text="Board's total columns", verbose_name="Board cols"
|
|
),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="game",
|
|
name="mines",
|
|
field=models.PositiveIntegerField(
|
|
default=5,
|
|
help_text="Board's total placed mines",
|
|
verbose_name="Mines on board",
|
|
),
|
|
),
|
|
migrations.AlterField(
|
|
model_name="game",
|
|
name="rows",
|
|
field=models.PositiveIntegerField(
|
|
default=10, help_text="Board's total rows", verbose_name="Board rows"
|
|
),
|
|
),
|
|
]
|