* Adding the GameVent model and migration * Initializing the GameEvent endpoint * GameEvent listing endpoint * Adding CLICK_NAIVE event * Added signal for identify what is on the click location * Using row and col integer is better than metadata with jsonfield * Create event for the same position is not allowed * Better signals control * Adding a board progress to Game model * Identifying the win status * Hide generated board from client
42 lines
1.1 KiB
Python
42 lines
1.1 KiB
Python
# Generated by Django 3.1.3 on 2020-11-06 04:53
|
|
|
|
from django.db import migrations, models
|
|
import game.models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
dependencies = [
|
|
("game", "0003_gameevent"),
|
|
]
|
|
|
|
operations = [
|
|
migrations.AlterModelOptions(
|
|
name="gameevent",
|
|
options={
|
|
"ordering": ["created_at"],
|
|
"verbose_name": "Game event",
|
|
"verbose_name_plural": "Game events",
|
|
},
|
|
),
|
|
migrations.AlterField(
|
|
model_name="gameevent",
|
|
name="type",
|
|
field=models.IntegerField(
|
|
choices=[
|
|
(0, "START_GAME"),
|
|
(1, "PAUSE"),
|
|
(2, "RESUME"),
|
|
(3, "CLICK_MINE"),
|
|
(4, "CLICK_POINT"),
|
|
(5, "CLICK_EMPTY"),
|
|
(6, "CLICK_FLAG"),
|
|
(7, "GAME_OVER"),
|
|
(8, "CLICK_NAIVE"),
|
|
],
|
|
default=game.models.EventTypes["START_GAME"],
|
|
help_text="The game event",
|
|
),
|
|
),
|
|
]
|