Skip to content

pete-the-programmer/tdd-ex-micro2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Hangman Extreme - Player Ranking

To get a handle on the game's success we want to rank the players. We are going to test the function that compares two players so that we can sort them. We will use the standard IComparable<T> interface that returns -1, 0, or +1 to indicate less than/equal/greater than.

Player

The rules for ranking the players are simple but have combinatorial effects:

  1. If the Player ID is the same, then it's the same player.
  2. The Player with the higher Status comes first.
  3. If they have the same Status, then the Player that played most recently comes first.
  4. Otherwise the Player with the lower ID comes first.

Get the code:

git clone https://github.com/pete-the-programmer/tdd-ex-micro2

Your mission: Check that the comparison function does what it says on the tin.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages