Skip to content

Instantly share code, notes, and snippets.

@oinant

oinant/HeroBuilder_step01.cs Secret

Last active Sep 14, 2015
Embed
What would you like to do?
namespace Blog.RolePlayingGame.Core
{
public class HeroBuilder
{
private HeroClass _class;
public HeroBuilder OfWarriorClass()
{
_class = HeroClass.Warrior;
return this;
}
public Hero Create()
{
return new Hero(@class: _class,
name: _name ,
level:1,
health: _health,
strength: 0,
spirit: 0,
speed: 0);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.