Skip to content

Instantly share code, notes, and snippets.

View Caaz's full-sized avatar

Daniel Cavazos Caaz

View GitHub Profile
@Caaz
Caaz / game.rb
Created February 10, 2017 01:04 — forked from mbartlet/game.rb
require_relative 'nim.rb'
nim = Nim.new
print "Please select board configuration: (0: [4,3,7], 1: [1,3,5,7]): "
choice = Integer(gets.chomp) rescue nil
while !(choice.match(/0|1/))
puts "Invalid input"
puts "Please select board configuration: (0: [4,3,7], 1: [1,3,5,7]): "
choice = Integer(gets.chomp) rescue nil
end