according to the suda , a 10th century encyclopedia , sophocles wrote 123 plays during the course of his life , but only seven have survived in a complete form : ajax , antigone , the women of trachis , oedipus the king , electra , philoctetes and oedipus at colonus .