Complex-systems approach to language games