The statistical mechanics of lattice gases