Sha256: e27e57f4630c582c069d30017f75ad1de353337cf206a2f7d4a3bf7ec5e70f63
Contents?: true
Size: 617 Bytes
Versions: 2
Compression:
Stored size: 617 Bytes
Contents
using System; using System.Collections.Generic; namespace ClrModels { public class Ninja : IWarrior{ public Ninja(){ Name = "Tony the Ninja"; _id = 1; } private readonly int _id; public string Name { get; set; } public int Id { get { return _id; } } public int Attack(IWarrior target, IWeapon weapon){ return weapon.Attack(target); } public bool IsKilledBy(IWeapon weapon) { return weapon.Damage() > 3; } private int _life = 10; public virtual int SurviveAttackWith(IWeapon weapon){ return _life - weapon.Damage(); } } }
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
caricature-0.7.7 | spec/fixtures/Ninja.cs |
caricature-0.7.6 | spec/fixtures/Ninja.cs |