Sha256: 3617c5c6da55421c08ffbf1aeabe1b0a09f4d958b3e3fb407e3d9d3fa59e096e
Contents?: true
Size: 297 Bytes
Versions: 3
Compression:
Stored size: 297 Bytes
Contents
module Linotype class Player DEFAULT_STRATEGY = ->(move) { (move.score[:defended] * 2) + move.score[:covered] } attr_accessor :strategy def initialize(args={}) args = { strategy: DEFAULT_STRATEGY }.merge(args) self.strategy = args[:strategy] end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
linotype-0.0.6 | lib/linotype/player.rb |
linotype-0.0.5 | lib/linotype/player.rb |
linotype-0.0.4 | lib/linotype/player.rb |