Let F be a field, V a finite subset of Fn. We introduce the lex game, which yields a combinatorial description of the lexicographic standard monomials of the ideal I(V) of polynomials vanishing on V.As a consequence, we obtain a fast algorithm which computes the lexicographic standard monomials of I(V).We apply the lex game to calculate explicitly the standard monomials for special types of subsets of {0,1}n. For D⊆Z let VD denote the vectors y∈{0,1}n in which the number of ones (the Hamming weight of y) is in D. We calculate the lexicographic standard monomials of VD, where D=D(d,ℓ,r)={a∈Z:∃a′∈Zwithd≤a′≤d+ℓ−1anda′≡a(modr)}, for d,ℓ,r∈N fixed with 0≤d<r and 0<ℓ<r. This extends the results of [Anstee, R.P., Rónyai, L., Sali, A., 2002. Shattering news. Graphs and Combinatorics 18, 59–73, Friedl, K., Hegedűs, G., Rónyai, L., Gröbner bases for complete l-wide families (in press) and Hegedűs, G., Rónyai, L., 2003. Gröbner bases for complete uniform families. Journal of Algebraic Combinatorics 17, 171–180].