Note that there are some explanatory texts on larger screens.

plurals
  1. PODjango strategy card game structure
    text
    copied!<p>I'm doing a multi-player text based card game for fun in Django where each card allows each player to make some standard actions (Draw more cards, get gold, get points etc.) and maybe some other abilities (Like destroy a card from an opponents hand, give an opponent minus points and many more).</p> <p>I have created a Card class:</p> <pre><code>class Card(models.Model): name = models.CharField(max_length=255, verbose_name="Name") description = models.TextField(verbose_name="Description") victory = models.BooleanField("Victory Card") action = models.BooleanField("Action Card") reaction = models.BooleanField("Reaction Card") treasure = models.BooleanField("Treasure Card") attack = models.BooleanField("Attack Card") plus_action = models.IntegerField(max_length=2, verbose_name="Plus actions", null=True, blank=True) plus_card = models.IntegerField(max_length=2, verbose_name="Plus cards", null=True, blank=True) plus_buy = models.IntegerField(max_length=2, verbose_name="Plus buy", null=True, blank=True) plus_gold = models.IntegerField(max_length=2, verbose_name="Plus gold", null=True, blank=True) plus_victory = models.IntegerField(max_length=2, verbose_name="Plus victory", null=True, blank=True) cost = models.IntegerField(max_length=2, verbose_name="Cost") </code></pre> <p>My problem is that I don't know how to represent the other abilities. I have thought about properties but I'm not sure if that's the way to go or how to go about it.</p> <p>Do you guys have any suggestions? Thanks in advance!</p> <p>Regards,<br> Andri</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload