/// <summary> /// Updates the states. /// </summary> /// <param name="rank">The rank.</param> /// <param name="old_rank">The old_rank.</param> public void Update(int rank, int old_rank) { this.state = this.state.Update(rank, old_rank); }
/// <summary> /// Initializes a new instance of the <see cref="weak"/> class. /// </summary> /// <param name="c">The c.</param> public weak(IState c) { this.n = c.n; }
/// <summary> /// Initializes a new instance of the <see cref="Context" /> class. /// </summary> /// <param name="state">The state.</param> public Context(IState state) { if (state is normal) this.state = new normal(state.limit); else if (state is thrown) this.state = new thrown(); else { this.state = new weak(state); } }