class Array
    def delOnce(item)
        newA = self.clone;
        newA.each_index { |idx|
            newA.slice!(idx, 1) and return newA if (newA[idx] == item);
        };
        return newA;
    end

    def to_s
        "["+self.join(' , ')+"]"
    end
end

class Scrabble
    @@premSq = [
        ['W',' ',' ','l',' ',' ',' ','W',' ',' ',' ','l',' ',' ','W'],
        [' ','L',' ',' ',' ','L',' ',' ',' ','L',' ',' ',' ','L',' '],
        [' ',' ','w',' ',' ',' ','l',' ','l',' ',' ',' ','w',' ',' '],
        ['l',' ',' ','w',' ',' ',' ','l',' ',' ',' ','w',' ',' ','l'],
        [' ',' ',' ',' ','w',' ',' ',' ',' ',' ','w',' ',' ',' ',' '],
        [' ','L',' ',' ',' ','L',' ',' ',' ','L',' ',' ',' ','L',' '],
        [' ',' ','l',' ',' ',' ','l',' ','l',' ',' ',' ','l',' ',' '],
        ['W',' ',' ','l',' ',' ',' ','W',' ',' ',' ','l',' ',' ','W'],
        [' ',' ','l',' ',' ',' ','l',' ','l',' ',' ',' ','l',' ',' '],
        [' ','L',' ',' ',' ','L',' ',' ',' ','L',' ',' ',' ','L',' '],
        [' ',' ',' ',' ','w',' ',' ',' ',' ',' ','w',' ',' ',' ',' '],
        ['l',' ',' ','w',' ',' ',' ','l',' ',' ',' ','w',' ',' ','l'],
        [' ',' ','w',' ',' ',' ','l',' ','l',' ',' ',' ','w',' ',' '],
        [' ','L',' ',' ',' ','L',' ',' ',' ','L',' ',' ',' ','L',' '],
        ['W',' ',' ','l',' ',' ',' ','W',' ',' ',' ','l',' ',' ','W']
    ];

    @@lrvals = {"a" => 1, "b" => 3,
        "c" => 3, "d" => 2, "e" => 1, "f" => 4,
        "g" => 2, "h" => 4, "i" => 1, "j" => 8,
        "k" => 5, "l" => 1, "m" => 3, "n" => 1,
        "o" => 1, "p" => 3, "q" => 10, "r" => 1,
        "s" => 1, "t" => 1, "u" => 1, "v" => 4,
        "w" => 4, "x" => 8, "y" => 4, "z" => 10
    };
    
    def Scrabble.premSq
        return @@premSq;
    end
    def Scrabble.lrvals
        return @@lrvals;
    end
end
