search for: self_defended

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

2012 Feb 10
0
Rspec testing (gunfight at coral)
...owing methods on this class, and then implement these methods. 1. conflict_free?(cowboys) which takes in a set of cowboys and returns true if this set is conflict-free and false otherwise. 2. defended?(cowboy,group) which returns true if the cowboy is defended by the group and false otherwise. 3. self_defended?(group) which, when given a group, returns true if the group is a self defending group. Task 2 We can identify several different groups of safe cowboys. First, there are those cowboys that are unconditionally alive. For example, given the following configuration of fighters f=Fighters.new([:a,:b...