Sha256: 3922047be4ec6b2ae0bd7e721c9aa8d43753828a0d8448c9c0f3bd9bb6751d7e

Contents?: true

Size: 545 Bytes

Versions: 2

Compression:

Stored size: 545 Bytes

Contents

using System;
using System.Collections.Generic;

namespace ClrModels {
	public sealed class Samurai : IWarrior{

    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() > 5;
    }

    private int _life = 10;
    public 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/Samurai.cs
caricature-0.7.6 spec/fixtures/Samurai.cs