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 949567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T23:25:20+00:00 2026-05-15T23:25:20+00:00

I want to try to implement the Tetris Game using TDD. From what I’ve

  • 0

I want to try to implement the Tetris Game using TDD.

From what I’ve come to understand when reading Growing Object-Oriented Software, Guided by Tests, I should start by defining what would be my Acceptance tests. If I am right, Acceptance tests when doing TDD are defined just like Use Cases.

It is of great importance to define a good first Acceptance Test that will work as “skeleton” of the App, so it should be kind of simple.

I’ve choosen the following 2 Acceptance Tests as my first to implement:

  1. The Game starts and the Player closes it.
  2. The Game starts and the Player does nothing. He eventually loses.

Are these 2 acceptance tests good starting tests? What would be good next acceptance tests? I could think of something like

  • The game starts and only square pieces drop. The player puts them all in such a way that the lines always “explode”, making the Game after 100 game-steps still be not over.

but I feel this is kind of awkward, as in a real Tetris game you would always have different pieces falling, and that is what Acceptance Testing should be about.

Also, I feel kind of tempted to just try to implement everything in one go when doing (2), which I think is not one pretends when implementing the second Acceptance Test. I guess the idea would be to only have the game implemented after like 6-7 of them, not on the second. Am I right?

Thanks

  • 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-15T23:25:21+00:00Added an answer on May 15, 2026 at 11:25 pm

    I would think first about the game field and what it looks like after a number of frames with some defined blocks dropped. For example using Cucumber:

    Scenario: dropping the first square
      Given an empty 10x2 field
    
      When a square is dropped at column 4
      And 48 frames have passed
    
      Then the field should contain a square at (4, 1)
    
      When 48 frames have passed
      Then the field should contain a square at (4, 2)
    
    Scenario: Dropping a square on a full stack
      Given an empty 10x2 field
      And a square at (4, 2)
    
      When a square is dropped at column 4
      And 48 frames have passed
    
      Then the game should be over
    

    If you like the look of Cucumber feature specs, you might want to try Cuke4Nuke for .Net or Cuke4Duke for Java.

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

Sidebar

Related Questions

I currently try to implement some interprocess communication using the Windows CreateFileMapping mechanism. I
I want to try to convert a string to a Guid, but I don't
I want to try PartCover for code coverage. I'm running Visual Studio 2008 Professional
I want to try out SICP with Python. Can any one point to materials
I have a small project I want to try porting to Python 3 -
I want to give Windows Server 2008 a try as a .NET developer and
I try to write a simple Markdown parser in JavaScript. Therefore I want to
I would like to to try Emacs, and want to give it the best
as google does not deliver what i want to know, i try to ask
This might be a little hard to explain, but I will try. I want

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.