can you make a mud cake using cooked quinoa instead of normal wheat flours
Making substitutions to baking usually requires a bit of experimentation, so unless you're set on converting a particular recipe, your best option is to start with a recipe that is designed to use it.  There are tons of chocolate quinoa cake recipes on the internet.  

If you are hoping to convert a favourite recipe to gluten-free (the usual point of these cake recipes), then the proportions of the recipes I looked at are generally similar to flour cake recipes (2 cups cooked quinoa for a 2-layer cake), but the cake batters are mixed in a blender or food processor instead.  I assume this is to make the quinoa finer, more similar in texture to flour.