Web Application Project
# https://www.primarysite-kidszone.co.uk/kidszone/resources/connect4.htm # Ruby code file - All your code should be located between the comments provided. # Add any additional gems and global variables here # require 'sinatra' # remove '#' character to run sinatra wen server # Main class module module MS_Game # Input and output constants processed by subprocesses. MUST NOT change. TOKEN1 = "O" # mine found TOKEN2 = "X" # mine not found class Game attr_reader :matrix, :player1, :player2, :hotspots, :input, :output, :turn, :turnsleft, :winner, :played, :score, :resulta, :resultb, :guess attr_writer :matrix, :player1, :player2, :hotspots, :input, :output, :turn, :turnsleft, :winner, :played, :score, :resulta, :resultb, :guess def initialize(input, output) @input = input @output = output end def getinput txt = @input.gets.chomp return txt end # Any code/methods aimed at passing the RSpect tests should be added below. # Any code/methods aimed at passing the RSpect tests should be added above. end end