Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 578017
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T14:12:58+00:00 2026-05-13T14:12:58+00:00

I am making a role playing game for fun and attempting to use TDD

  • 0

I am making a role playing game for fun and attempting to use TDD while developing it. Many of the TDD examples I see focus on creating the test first, then creating objects that are needed to get the test to pass.

For example:

[Test]
public void Character_WhenHealthIsBelowZero_IsDead()
{
   // create default character with 10 health
   Character character = new Character();
   character.SubtractHealth(20);
   Assert.That(character.IsAlive, Is.EqualTo(false));
}

So based on this I’ll create the character class and appropriate properties/methods. This seems fine and all but should my class design really come out of continually refining my tests? Is that better than mapping out the possible objects that my game will need ahead of time? For example, I would normally think of a base Character class, then subclasses such as Wizard, Fighter, Theif.

Or is a balanced approach the way to go? One where I map out the possible classes and hierarchy I’ll need but writing tests first to verify they are actually needed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T14:12:58+00:00Added an answer on May 13, 2026 at 2:12 pm

    Should my class design really come out
    of continually refining my tests?

    Yes.

    Does TDD mean not thinking about class
    design?

    Absolutely not. It means thinking about class design in the course of writing your tests, and the rest of your code. Class design is at play throughout the Red-Green-Refactor TDD life cycle.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For my bachelor thesis I'm programming an Role Playing Game maker. I'm making use
I'm making a role playing game just for fun and to learn more about
I am in the process of making a basic role-playing game. I want to
Making an adobe flex ui in which data that is calculated must use proprietary
While making some final tests of a class-library that I'm writing for Windows Mobile
I'm making a game in actionscript using the FlashDevelop tool and the FlashPunk game
I have just finished creating a custom role provider using LINQ to SQL for
I'm looking at creating a decentralized role-management system which integrates with Java EE roles.
I'm playing with gtkD for a while, and I'm learning D2/Phobos in parallel. Yesterday
A User can have many roles, but only one role per Brand. Class User

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.