Profile picture
Artifact @PlayArtifact
, 5 tweets, 2 min read Read on Twitter
Game rules stability is the property where, if you change the game code, you don't break how cards behave. To help ensure this, code design on Artifact is heavily test-driven. If we add a mechanic we can auto-check that we didn't break a bunch of card interactions.
New cards are implemented through tests even before the card is playable on the client. When we find a rules bug, we also write a test for that case so we'll know if we break it again in the future. We like self-documenting tests, so we end up with some crazy test names.
The tests themselves check only a single idea at a time and are designed to be as simple as the idea allows. This test ensures that if a Melee Creep hits a tower that as Assault Ladders the tower takes 4 damage instead of 2.
In addition to card tests, there are tests for basic functionality like core combat rules, timer rules, phase progression, shopping, etc. Some of the tests shown above use old names for cards instead of their current names - Assassin's Shadow used to be called Berzerker Champion.
This system doesn't guarantee that we never ship card bugs or break old cards, but it really helps and if we do break a card we can add a test and prevent that kind of bug from happening again. This is a standard engineering practice, but one we thought was interesting to share.
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Artifact
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!