search for: unconditionally_dead

Displaying 1 result from an estimated 1 matches for "unconditionally_dead".

2012 Feb 10
0
Rspec testing (gunfight at coral)
...e cowboys that are unconditionally alive. For example, given the following configuration of fighters f=Fighters.new([:a,:b,:c],[[:a,:b],[:b,:c]]) Cowboys :a and :c will survive the fight as a would end up shooting b meaning that c would not be shot. Create methods called unconditionally_alive and unconditionally_dead which compute (and return as an array) those cowboys which are definitely alive and dead. Hint: To compute these, start with the cowboys which have no one aiming at them; these are unconditionally alive. Those cowboys being aimed at by these unconditionally alive cowboys are unconditionally dead,...