I would always buy current gen.
The processors and motherboards cost the same, and you get more performance at every price point.
For i7-7700K,
any Z270 based motherboard will allow overclocking and perform about the same.
For a gamer, you may find that a cheaper I5-7600K with an overclock will do just as well.
Few games can use I7 hyperthreads.