free_mutant/lib/mutant/mutation/evil.rb

48 lines
845 B
Ruby
Raw Normal View History

# encoding: utf-8
2013-01-15 23:46:05 +01:00
module Mutant
class Mutation
# Evul mutation
class Evil < self
# Return identification
#
# @return [String]
#
# @api private
#
def identification
"evil:#{super}"
end
memoize :identification
# Test if killer is successful
#
# @param [Killer] killer
#
# @return [true]
# if killer killed mutation
#
# @return [false]
# otherwise
#
# @api private
#
def success?(killer)
killer.killed?
end
2013-07-28 15:19:01 -07:00
# Indicate if a killer should treat a kill as problematic
#
2013-07-28 15:19:01 -07:00
# @return [false] Killing evil mutants is not problematic
#
# @api private
#
def should_survive?
false
end
2013-06-14 20:54:02 +02:00
end # Evil
end # Mutation
end # Mutant