Sha256: 28cbcd192f0d7cd2a6c148fd33617a4ab513c5a54a50619425a36b765e3dfc9a

Contents?: true

Size: 536 Bytes

Versions: 3

Compression:

Stored size: 536 Bytes

Contents

module Cardgame
  class Ai
    def initialize
      @stack   = Array.new
      @discard = Array.new
      #attr_accessor :name
      @ai_name = "H.E.L.P.E.R."
    end

    def stack
      @stack
    end
    #
    #def stack=(card)
    #  @stack = Array.new
    #  @stack << card
    #end

    def discard
      @discard
    end

    #def empty_discard
    #  @discard = Array.new
    #end

    def name
      @ai_name
    end

    def difficulty_check?(rand_src, difficulty)
      rand_src < difficulty ? TRUE : FALSE
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
warcards-0.0.7 lib/warcards/ai.rb
warcards-0.0.6 lib/warcards/ai.rb
warcards-0.0.5 lib/warcards/ai.rb